{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## pandas数据结构"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd # pandas基于NumPy，升级"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### Series"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 6, 9])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "0    1\n",
       "1    2\n",
       "2    3\n",
       "3    6\n",
       "4    9\n",
       "dtype: int64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Series\n",
    "l = np.array([1,2,3,6,9]) # NumPy数组\n",
    "\n",
    "s1 = pd.Series(data = l)\n",
    "display(l,s1) # Series是一维的数组，和NumPy数组不一样：Series多了索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A    1\n",
       "B    2\n",
       "C    3\n",
       "D    6\n",
       "E    9\n",
       "dtype: int64"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2 = pd.Series(data = l,index = list('ABCDE'))\n",
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A    149\n",
       "B    130\n",
       "C    118\n",
       "D     99\n",
       "E     66\n",
       "dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s3 = pd.Series(data = {'A':149,'B':130,'C':118,'D':99,'E':66})\n",
    "s3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>113.0</td>\n",
       "      <td>37.0</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>92.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>11.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>0.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>66.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>40.0</td>\n",
       "      <td>145.0</td>\n",
       "      <td>23.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25.0</td>\n",
       "      <td>133.0</td>\n",
       "      <td>108.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>124.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>130.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>121.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>133.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>84.0</td>\n",
       "      <td>125.0</td>\n",
       "      <td>39.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>111.0</td>\n",
       "      <td>36.0</td>\n",
       "      <td>137.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>55.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>85.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   Math     En\n",
       "A   113.0   37.0   70.0\n",
       "B    92.0   22.0   11.0\n",
       "C     0.0    9.0   66.0\n",
       "D    40.0  145.0   23.0\n",
       "E    25.0  133.0  108.0\n",
       "F   124.0   16.0  130.0\n",
       "H   121.0   85.0  133.0\n",
       "I    84.0  125.0   39.0\n",
       "J   111.0   36.0  137.0\n",
       "K    55.0   26.0   85.0"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Series是一维的，功能比较少\n",
    "# DataFrame是二维的，多个Series公用索引，组成了DataFrame\n",
    "# 像不像 Excel，所有数据，结构化\n",
    "df1 = pd.DataFrame(data = np.random.randint(0,151,size = (10,3)),\n",
    "                   index = list('ABCDEFHIJK'), # 行索引\n",
    "                   columns=['Python','Math','En'],dtype=np.float16) # 列索引\n",
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>66</td>\n",
       "      <td>88</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>99</td>\n",
       "      <td>65</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>128</td>\n",
       "      <td>137</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "0      66    88  100\n",
       "1      99    65  121\n",
       "2     128   137   45"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(data = {'Python':[66,99,128],'Math':[88,65,137],'En':[100,121,45]})\n",
    "df2 # 字典，key作为列索引，不指定index默认从0开始索引，自动索引一样"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据查看"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>133</td>\n",
       "      <td>139</td>\n",
       "      <td>141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>82</td>\n",
       "      <td>17</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>51</td>\n",
       "      <td>51</td>\n",
       "      <td>145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>127</td>\n",
       "      <td>70</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>93</td>\n",
       "      <td>60</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>57</td>\n",
       "      <td>133</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>91</td>\n",
       "      <td>21</td>\n",
       "      <td>134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>76</td>\n",
       "      <td>109</td>\n",
       "      <td>113</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>99</td>\n",
       "      <td>82</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>28</td>\n",
       "      <td>54</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0      133   139  141\n",
       "1       82    17  130\n",
       "2       51    51  145\n",
       "3      127    70   11\n",
       "4       93    60   91\n",
       "..     ...   ...  ...\n",
       "95      57   133   96\n",
       "96      91    21  134\n",
       "97      76   109  113\n",
       "98      99    82   29\n",
       "99      28    54   88\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = np.random.randint(0,151,size = (100,3)),\n",
    "                  columns=['Python','Math','En'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 3)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape # 查看DataFrame形状"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>133</td>\n",
       "      <td>139</td>\n",
       "      <td>141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>82</td>\n",
       "      <td>17</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>51</td>\n",
       "      <td>51</td>\n",
       "      <td>145</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "0     133   139  141\n",
       "1      82    17  130\n",
       "2      51    51  145"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(n = 3) # 显示前N个，默认N = 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>57</td>\n",
       "      <td>133</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>91</td>\n",
       "      <td>21</td>\n",
       "      <td>134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>76</td>\n",
       "      <td>109</td>\n",
       "      <td>113</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>99</td>\n",
       "      <td>82</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>28</td>\n",
       "      <td>54</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "95      57   133   96\n",
       "96      91    21  134\n",
       "97      76   109  113\n",
       "98      99    82   29\n",
       "99      28    54   88"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.tail() # 显示后n个"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    int64\n",
       "Math      int64\n",
       "En        int64\n",
       "dtype: object"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.dtypes # 数据类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 100 entries, 0 to 99\n",
      "Data columns (total 3 columns):\n",
      " #   Column  Non-Null Count  Dtype\n",
      "---  ------  --------------  -----\n",
      " 0   Python  100 non-null    int64\n",
      " 1   Math    100 non-null    int64\n",
      " 2   En      100 non-null    int64\n",
      "dtypes: int64(3)\n",
      "memory usage: 2.5 KB\n"
     ]
    }
   ],
   "source": [
    "df.info() # 比较详细信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>100.000000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>100.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>85.790000</td>\n",
       "      <td>77.410000</td>\n",
       "      <td>67.630000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>41.375173</td>\n",
       "      <td>44.905309</td>\n",
       "      <td>43.883835</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>54.500000</td>\n",
       "      <td>40.250000</td>\n",
       "      <td>31.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>84.500000</td>\n",
       "      <td>81.000000</td>\n",
       "      <td>58.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>123.000000</td>\n",
       "      <td>113.250000</td>\n",
       "      <td>103.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>149.000000</td>\n",
       "      <td>149.000000</td>\n",
       "      <td>147.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Python        Math          En\n",
       "count  100.000000  100.000000  100.000000\n",
       "mean    85.790000   77.410000   67.630000\n",
       "std     41.375173   44.905309   43.883835\n",
       "min      3.000000    0.000000    3.000000\n",
       "25%     54.500000   40.250000   31.250000\n",
       "50%     84.500000   81.000000   58.500000\n",
       "75%    123.000000  113.250000  103.000000\n",
       "max    149.000000  149.000000  147.000000"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe() # 描述：平均值、标准差、中位数、四等分、最大值，最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[133, 139, 141],\n",
       "       [ 82,  17, 130],\n",
       "       [ 51,  51, 145],\n",
       "       [127,  70,  11],\n",
       "       [ 93,  60,  91],\n",
       "       [103, 110, 103],\n",
       "       [ 27, 133,  32],\n",
       "       [148,  99, 128],\n",
       "       [139,  97,  44],\n",
       "       [ 64,  85,  71],\n",
       "       [147,  94,  37],\n",
       "       [114,  12,  16],\n",
       "       [ 16,  54,  44],\n",
       "       [123,   3,  76],\n",
       "       [137,  97, 123],\n",
       "       [149, 113,  74],\n",
       "       [ 69,  38,   7],\n",
       "       [ 68, 122,   4],\n",
       "       [ 53,  13,  47],\n",
       "       [113, 127, 124],\n",
       "       [ 55, 139,  47],\n",
       "       [140, 114,  14],\n",
       "       [ 84, 111, 115],\n",
       "       [ 65,   5, 136],\n",
       "       [ 96,  50,  89],\n",
       "       [145, 130,  15],\n",
       "       [111,  30,  66],\n",
       "       [132, 122, 144],\n",
       "       [ 79,   5,  45],\n",
       "       [115,  29,  49],\n",
       "       [ 27,  55,  83],\n",
       "       [ 29,  74,  38],\n",
       "       [ 87, 100,  45],\n",
       "       [132, 147, 119],\n",
       "       [ 66,  90,  40],\n",
       "       [ 67, 108,  48],\n",
       "       [ 78,  28,  46],\n",
       "       [105, 137, 110],\n",
       "       [132, 119,  55],\n",
       "       [117,  23,  79],\n",
       "       [ 12,  29,  12],\n",
       "       [114,  58, 119],\n",
       "       [139,   0,  42],\n",
       "       [ 61,  69, 142],\n",
       "       [141,  73, 107],\n",
       "       [ 49,  12,  19],\n",
       "       [  8,   1,  75],\n",
       "       [134,  60,  25],\n",
       "       [138,  80,  79],\n",
       "       [112, 115,  26],\n",
       "       [ 77,   4, 120],\n",
       "       [140, 100,  35],\n",
       "       [ 82, 129,   4],\n",
       "       [100,   8,  25],\n",
       "       [ 77,  97,  78],\n",
       "       [ 55, 113,  53],\n",
       "       [ 45,  73,  37],\n",
       "       [ 44,   0,  80],\n",
       "       [ 26,  74,  52],\n",
       "       [ 99,  75, 147],\n",
       "       [111,   8, 144],\n",
       "       [ 55, 146,  15],\n",
       "       [140, 106,  74],\n",
       "       [ 91,  78,  92],\n",
       "       [130, 108,  41],\n",
       "       [ 34,  41, 136],\n",
       "       [  3, 139,   4],\n",
       "       [123,  93,   4],\n",
       "       [ 24, 103,   3],\n",
       "       [ 44, 122,  92],\n",
       "       [ 83,  45,  50],\n",
       "       [ 46, 149, 103],\n",
       "       [ 48, 127,  92],\n",
       "       [  3,  51,  57],\n",
       "       [136, 136,  82],\n",
       "       [ 65, 102,  16],\n",
       "       [ 23,  61, 118],\n",
       "       [138,  15,   6],\n",
       "       [ 83,  91,   4],\n",
       "       [109,  24,  54],\n",
       "       [ 40,  43, 125],\n",
       "       [103, 123, 141],\n",
       "       [116, 113,  38],\n",
       "       [137,  71, 126],\n",
       "       [ 69, 143,  83],\n",
       "       [  8,  60,  60],\n",
       "       [ 40,  22,  95],\n",
       "       [ 73,  19,  17],\n",
       "       [137, 129, 103],\n",
       "       [109, 142,  94],\n",
       "       [ 85, 105,  10],\n",
       "       [ 97, 107,  19],\n",
       "       [ 79,  12,  27],\n",
       "       [143,  74,  18],\n",
       "       [ 32, 114,  52],\n",
       "       [ 57, 133,  96],\n",
       "       [ 91,  21, 134],\n",
       "       [ 76, 109, 113],\n",
       "       [ 99,  82,  29],\n",
       "       [ 28,  54,  88]])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.values # 值，返回的是NumPy数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['Python', 'Math', 'En'], dtype='object')"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns # 列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=100, step=1)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.index # 行索引 0 ~ 99"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据输入与输出"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10</td>\n",
       "      <td>128</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>45</td>\n",
       "      <td>47</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>33</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70</td>\n",
       "      <td>24</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>90</td>\n",
       "      <td>143</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>145</td>\n",
       "      <td>25</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>53</td>\n",
       "      <td>51</td>\n",
       "      <td>109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>35</td>\n",
       "      <td>7</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>86</td>\n",
       "      <td>51</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>149</td>\n",
       "      <td>66</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0       10   128   54\n",
       "1       45    47   74\n",
       "2      103    33  133\n",
       "3       70    24   81\n",
       "4       90   143  121\n",
       "..     ...   ...  ...\n",
       "95     145    25  139\n",
       "96      53    51  109\n",
       "97      35     7  130\n",
       "98      86    51   20\n",
       "99     149    66   75\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = np.random.randint(0,151,size = (100,3)),\n",
    "                  columns=['Python','Math','En'])\n",
    "df # 行索引，列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_csv('./data.csv',sep = ',',\n",
    "          index = True, # 保存行索引\n",
    "          header=True) # 保存列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_csv('./data2.csv',sep = ',',\n",
    "          index = False, # 不保存行索引\n",
    "          header=False) # 不保存列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10</td>\n",
       "      <td>128</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>45</td>\n",
       "      <td>47</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>33</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70</td>\n",
       "      <td>24</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>90</td>\n",
       "      <td>143</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>145</td>\n",
       "      <td>25</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>53</td>\n",
       "      <td>51</td>\n",
       "      <td>109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>35</td>\n",
       "      <td>7</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>86</td>\n",
       "      <td>51</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>149</td>\n",
       "      <td>66</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0       10   128   54\n",
       "1       45    47   74\n",
       "2      103    33  133\n",
       "3       70    24   81\n",
       "4       90   143  121\n",
       "..     ...   ...  ...\n",
       "95     145    25  139\n",
       "96      53    51  109\n",
       "97      35     7  130\n",
       "98      86    51   20\n",
       "99     149    66   75\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_csv('./data.csv',\n",
    "            index_col=0) # 第一列作为行索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10</td>\n",
       "      <td>128</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>45</td>\n",
       "      <td>47</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>33</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70</td>\n",
       "      <td>24</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>90</td>\n",
       "      <td>143</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>145</td>\n",
       "      <td>25</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>53</td>\n",
       "      <td>51</td>\n",
       "      <td>109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>35</td>\n",
       "      <td>7</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>86</td>\n",
       "      <td>51</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>149</td>\n",
       "      <td>66</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      0    1    2\n",
       "0    10  128   54\n",
       "1    45   47   74\n",
       "2   103   33  133\n",
       "3    70   24   81\n",
       "4    90  143  121\n",
       "..  ...  ...  ...\n",
       "95  145   25  139\n",
       "96   53   51  109\n",
       "97   35    7  130\n",
       "98   86   51   20\n",
       "99  149   66   75\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_csv('./data2.csv',header =None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### Excel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10</td>\n",
       "      <td>128</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>45</td>\n",
       "      <td>47</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>33</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70</td>\n",
       "      <td>24</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>90</td>\n",
       "      <td>143</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>145</td>\n",
       "      <td>25</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>53</td>\n",
       "      <td>51</td>\n",
       "      <td>109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>35</td>\n",
       "      <td>7</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>86</td>\n",
       "      <td>51</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>149</td>\n",
       "      <td>66</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0       10   128   54\n",
       "1       45    47   74\n",
       "2      103    33  133\n",
       "3       70    24   81\n",
       "4       90   143  121\n",
       "..     ...   ...  ...\n",
       "95     145    25  139\n",
       "96      53    51  109\n",
       "97      35     7  130\n",
       "98      86    51   20\n",
       "99     149    66   75\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_excel('./data.xls')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10</td>\n",
       "      <td>128</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>45</td>\n",
       "      <td>47</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>33</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70</td>\n",
       "      <td>24</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>90</td>\n",
       "      <td>143</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>145</td>\n",
       "      <td>25</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>53</td>\n",
       "      <td>51</td>\n",
       "      <td>109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>35</td>\n",
       "      <td>7</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>86</td>\n",
       "      <td>51</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>149</td>\n",
       "      <td>66</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0       10   128   54\n",
       "1       45    47   74\n",
       "2      103    33  133\n",
       "3       70    24   81\n",
       "4       90   143  121\n",
       "..     ...   ...  ...\n",
       "95     145    25  139\n",
       "96      53    51  109\n",
       "97      35     7  130\n",
       "98      86    51   20\n",
       "99     149    66   75\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_excel('./data.xls',\n",
    "              index_col=0) # 第一列作为行索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### HDF5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_hdf('./data.h5',key = 'score')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>计算机</th>\n",
       "      <th>化工</th>\n",
       "      <th>生物</th>\n",
       "      <th>工程</th>\n",
       "      <th>教师</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>64</td>\n",
       "      <td>22</td>\n",
       "      <td>16</td>\n",
       "      <td>68</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>95</td>\n",
       "      <td>47</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>88</td>\n",
       "      <td>48</td>\n",
       "      <td>92</td>\n",
       "      <td>50</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>75</td>\n",
       "      <td>38</td>\n",
       "      <td>8</td>\n",
       "      <td>63</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>62</td>\n",
       "      <td>14</td>\n",
       "      <td>20</td>\n",
       "      <td>21</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>995</th>\n",
       "      <td>89</td>\n",
       "      <td>94</td>\n",
       "      <td>88</td>\n",
       "      <td>97</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>996</th>\n",
       "      <td>52</td>\n",
       "      <td>68</td>\n",
       "      <td>21</td>\n",
       "      <td>8</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>997</th>\n",
       "      <td>76</td>\n",
       "      <td>99</td>\n",
       "      <td>10</td>\n",
       "      <td>92</td>\n",
       "      <td>56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>998</th>\n",
       "      <td>66</td>\n",
       "      <td>31</td>\n",
       "      <td>55</td>\n",
       "      <td>65</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999</th>\n",
       "      <td>8</td>\n",
       "      <td>21</td>\n",
       "      <td>38</td>\n",
       "      <td>89</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     计算机  化工  生物  工程  教师\n",
       "0     64  22  16  68  60\n",
       "1     95  47  72  76  37\n",
       "2     88  48  92  50  37\n",
       "3     75  38   8  63  83\n",
       "4     62  14  20  21  45\n",
       "..   ...  ..  ..  ..  ..\n",
       "995   89  94  88  97  27\n",
       "996   52  68  21   8  50\n",
       "997   76  99  10  92  56\n",
       "998   66  31  55  65  94\n",
       "999    8  21  38  89  14\n",
       "\n",
       "[1000 rows x 5 columns]"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(data = np.random.randint(6,100,size = (1000,5)),\n",
    "                   columns=['计算机','化工','生物','工程','教师'])\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df2.to_hdf('./data.h5',key = 'salary')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>计算机</th>\n",
       "      <th>化工</th>\n",
       "      <th>生物</th>\n",
       "      <th>工程</th>\n",
       "      <th>教师</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>64</td>\n",
       "      <td>22</td>\n",
       "      <td>16</td>\n",
       "      <td>68</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>95</td>\n",
       "      <td>47</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>88</td>\n",
       "      <td>48</td>\n",
       "      <td>92</td>\n",
       "      <td>50</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>75</td>\n",
       "      <td>38</td>\n",
       "      <td>8</td>\n",
       "      <td>63</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>62</td>\n",
       "      <td>14</td>\n",
       "      <td>20</td>\n",
       "      <td>21</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>995</th>\n",
       "      <td>89</td>\n",
       "      <td>94</td>\n",
       "      <td>88</td>\n",
       "      <td>97</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>996</th>\n",
       "      <td>52</td>\n",
       "      <td>68</td>\n",
       "      <td>21</td>\n",
       "      <td>8</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>997</th>\n",
       "      <td>76</td>\n",
       "      <td>99</td>\n",
       "      <td>10</td>\n",
       "      <td>92</td>\n",
       "      <td>56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>998</th>\n",
       "      <td>66</td>\n",
       "      <td>31</td>\n",
       "      <td>55</td>\n",
       "      <td>65</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999</th>\n",
       "      <td>8</td>\n",
       "      <td>21</td>\n",
       "      <td>38</td>\n",
       "      <td>89</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     计算机  化工  生物  工程  教师\n",
       "0     64  22  16  68  60\n",
       "1     95  47  72  76  37\n",
       "2     88  48  92  50  37\n",
       "3     75  38   8  63  83\n",
       "4     62  14  20  21  45\n",
       "..   ...  ..  ..  ..  ..\n",
       "995   89  94  88  97  27\n",
       "996   52  68  21   8  50\n",
       "997   76  99  10  92  56\n",
       "998   66  31  55  65  94\n",
       "999    8  21  38  89  14\n",
       "\n",
       "[1000 rows x 5 columns]"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_hdf('./data.h5',key = 'salary')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### SQL"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "from sqlalchemy import create_engine # 数据库引擎，构建和数据库的连接"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "# PyMySQL\n",
    "# 类似网页地址\n",
    "engine = create_engine('mysql+pymysql://root:12345678@localhost/pandas?charset=utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df2.to_sql('salary',engine,index=False) # 将Python中数据DataFrame保存到Mysql"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>计算机</th>\n",
       "      <th>化工</th>\n",
       "      <th>生物</th>\n",
       "      <th>工程</th>\n",
       "      <th>教师</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>64</td>\n",
       "      <td>22</td>\n",
       "      <td>16</td>\n",
       "      <td>68</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>95</td>\n",
       "      <td>47</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>88</td>\n",
       "      <td>48</td>\n",
       "      <td>92</td>\n",
       "      <td>50</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>75</td>\n",
       "      <td>38</td>\n",
       "      <td>8</td>\n",
       "      <td>63</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>62</td>\n",
       "      <td>14</td>\n",
       "      <td>20</td>\n",
       "      <td>21</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>95</td>\n",
       "      <td>41</td>\n",
       "      <td>84</td>\n",
       "      <td>37</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>34</td>\n",
       "      <td>45</td>\n",
       "      <td>11</td>\n",
       "      <td>93</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>99</td>\n",
       "      <td>10</td>\n",
       "      <td>57</td>\n",
       "      <td>30</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>59</td>\n",
       "      <td>60</td>\n",
       "      <td>12</td>\n",
       "      <td>37</td>\n",
       "      <td>93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>41</td>\n",
       "      <td>58</td>\n",
       "      <td>15</td>\n",
       "      <td>67</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>63</td>\n",
       "      <td>96</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>75</td>\n",
       "      <td>61</td>\n",
       "      <td>78</td>\n",
       "      <td>49</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>86</td>\n",
       "      <td>84</td>\n",
       "      <td>31</td>\n",
       "      <td>68</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>42</td>\n",
       "      <td>98</td>\n",
       "      <td>24</td>\n",
       "      <td>20</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>95</td>\n",
       "      <td>15</td>\n",
       "      <td>97</td>\n",
       "      <td>80</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>52</td>\n",
       "      <td>22</td>\n",
       "      <td>44</td>\n",
       "      <td>35</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>67</td>\n",
       "      <td>20</td>\n",
       "      <td>65</td>\n",
       "      <td>24</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>9</td>\n",
       "      <td>46</td>\n",
       "      <td>41</td>\n",
       "      <td>62</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>86</td>\n",
       "      <td>76</td>\n",
       "      <td>80</td>\n",
       "      <td>72</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>61</td>\n",
       "      <td>81</td>\n",
       "      <td>64</td>\n",
       "      <td>26</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>77</td>\n",
       "      <td>92</td>\n",
       "      <td>84</td>\n",
       "      <td>18</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>87</td>\n",
       "      <td>16</td>\n",
       "      <td>75</td>\n",
       "      <td>14</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>82</td>\n",
       "      <td>92</td>\n",
       "      <td>42</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>61</td>\n",
       "      <td>89</td>\n",
       "      <td>28</td>\n",
       "      <td>21</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>22</td>\n",
       "      <td>12</td>\n",
       "      <td>38</td>\n",
       "      <td>89</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>77</td>\n",
       "      <td>12</td>\n",
       "      <td>46</td>\n",
       "      <td>89</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>60</td>\n",
       "      <td>45</td>\n",
       "      <td>52</td>\n",
       "      <td>71</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>29</td>\n",
       "      <td>76</td>\n",
       "      <td>94</td>\n",
       "      <td>26</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>14</td>\n",
       "      <td>60</td>\n",
       "      <td>82</td>\n",
       "      <td>88</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>56</td>\n",
       "      <td>36</td>\n",
       "      <td>44</td>\n",
       "      <td>60</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>63</td>\n",
       "      <td>77</td>\n",
       "      <td>43</td>\n",
       "      <td>42</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>25</td>\n",
       "      <td>71</td>\n",
       "      <td>36</td>\n",
       "      <td>51</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>76</td>\n",
       "      <td>86</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>93</td>\n",
       "      <td>59</td>\n",
       "      <td>86</td>\n",
       "      <td>25</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>73</td>\n",
       "      <td>40</td>\n",
       "      <td>12</td>\n",
       "      <td>86</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>10</td>\n",
       "      <td>30</td>\n",
       "      <td>54</td>\n",
       "      <td>13</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>9</td>\n",
       "      <td>48</td>\n",
       "      <td>58</td>\n",
       "      <td>75</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>81</td>\n",
       "      <td>41</td>\n",
       "      <td>61</td>\n",
       "      <td>12</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>80</td>\n",
       "      <td>68</td>\n",
       "      <td>66</td>\n",
       "      <td>92</td>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>53</td>\n",
       "      <td>36</td>\n",
       "      <td>84</td>\n",
       "      <td>26</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>19</td>\n",
       "      <td>62</td>\n",
       "      <td>63</td>\n",
       "      <td>47</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>89</td>\n",
       "      <td>39</td>\n",
       "      <td>91</td>\n",
       "      <td>31</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>57</td>\n",
       "      <td>43</td>\n",
       "      <td>53</td>\n",
       "      <td>48</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>66</td>\n",
       "      <td>16</td>\n",
       "      <td>23</td>\n",
       "      <td>19</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>46</td>\n",
       "      <td>28</td>\n",
       "      <td>78</td>\n",
       "      <td>81</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>38</td>\n",
       "      <td>53</td>\n",
       "      <td>76</td>\n",
       "      <td>49</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>55</td>\n",
       "      <td>94</td>\n",
       "      <td>70</td>\n",
       "      <td>6</td>\n",
       "      <td>44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>56</td>\n",
       "      <td>33</td>\n",
       "      <td>92</td>\n",
       "      <td>17</td>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>69</td>\n",
       "      <td>68</td>\n",
       "      <td>23</td>\n",
       "      <td>87</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>12</td>\n",
       "      <td>47</td>\n",
       "      <td>32</td>\n",
       "      <td>80</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    计算机  化工  生物  工程  教师\n",
       "0    64  22  16  68  60\n",
       "1    95  47  72  76  37\n",
       "2    88  48  92  50  37\n",
       "3    75  38   8  63  83\n",
       "4    62  14  20  21  45\n",
       "5    95  41  84  37  16\n",
       "6    34  45  11  93  94\n",
       "7    99  10  57  30  63\n",
       "8    59  60  12  37  93\n",
       "9    41  58  15  67  70\n",
       "10   19   8  63  96  64\n",
       "11   75  61  78  49  89\n",
       "12   86  84  31  68  27\n",
       "13   42  98  24  20  85\n",
       "14   95  15  97  80  87\n",
       "15   52  22  44  35  74\n",
       "16   67  20  65  24  10\n",
       "17    9  46  41  62  66\n",
       "18   86  76  80  72  19\n",
       "19   61  81  64  26   6\n",
       "20   77  92  84  18   7\n",
       "21   87  16  75  14  34\n",
       "22   23  82  92  42  32\n",
       "23   61  89  28  21  40\n",
       "24   22  12  38  89  14\n",
       "25   77  12  46  89  12\n",
       "26   60  45  52  71  67\n",
       "27   29  76  94  26  91\n",
       "28   14  60  82  88  60\n",
       "29   56  36  44  60  37\n",
       "30   63  77  43  42  82\n",
       "31   25  71  36  51  21\n",
       "32   76  86  87  83   8\n",
       "33   93  59  86  25  78\n",
       "34   73  40  12  86  66\n",
       "35   10  30  54  13  71\n",
       "36    9  48  58  75  85\n",
       "37   81  41  61  12  55\n",
       "38   80  68  66  92  84\n",
       "39   53  36  84  26  66\n",
       "40   19  62  63  47  45\n",
       "41   89  39  91  31  86\n",
       "42   57  43  53  48  19\n",
       "43   66  16  23  19  10\n",
       "44   46  28  78  81  21\n",
       "45   38  53  76  49   8\n",
       "46   55  94  70   6  44\n",
       "47   56  33  92  17  84\n",
       "48   69  68  23  87  90\n",
       "49   12  47  32  80  15"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df3 = pd.read_sql('select * from salary limit 50',con = engine)\n",
    "df3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据选取"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### 获取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>88</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>14</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>15</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>71</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>59</td>\n",
       "      <td>17</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>8</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      88    52   48\n",
       "B      78    62   94\n",
       "C       9    14   71\n",
       "D      86    15   21\n",
       "E       1    71   71\n",
       "F     123   138   55\n",
       "H      59    17  140\n",
       "I      68     8   58\n",
       "J     100    70   63\n",
       "K      79    37   72"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,151,size = (10,3)),\n",
    "                  index=list('ABCDEFHIJK'),columns=['Python','Math','En'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     88\n",
       "B     78\n",
       "C      9\n",
       "D     86\n",
       "E      1\n",
       "F    123\n",
       "H     59\n",
       "I     68\n",
       "J    100\n",
       "K     79\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'] # 获取数据Series"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     88\n",
       "B     78\n",
       "C      9\n",
       "D     86\n",
       "E      1\n",
       "F    123\n",
       "H     59\n",
       "I     68\n",
       "J    100\n",
       "K     79\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.Python # 属性，DataFrame中列索引，表示属性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>88</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>59</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   En\n",
       "A      88   48\n",
       "B      78   94\n",
       "C       9   71\n",
       "D      86   21\n",
       "E       1   71\n",
       "F     123   55\n",
       "H      59  140\n",
       "I      68   58\n",
       "J     100   63\n",
       "K      79   72"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[['Python','En']] # 获取多列数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 标签选择"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    88\n",
       "Math      52\n",
       "En        48\n",
       "Name: A, dtype: int64"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 标签，就是行索引 location = loc 位置\n",
    "df.loc['A']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>88</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "A      88    52  48\n",
       "F     123   138  55\n",
       "K      79    37  72"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[['A','F','K']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "88"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['A','Python']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     88\n",
       "C      9\n",
       "F    123\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[['A','C','F'],'Python']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>14</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>71</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>17</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Math   En\n",
       "A    52   48\n",
       "C    14   71\n",
       "E    71   71\n",
       "H    17  140\n",
       "J    70   63"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['A'::2,['Math','En']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>88</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>14</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>15</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "A      88    52  48\n",
       "B      78    62  94\n",
       "C       9    14  71\n",
       "D      86    15  21"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['A':'D',:]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 位置选择"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    88\n",
       "Math      52\n",
       "En        48\n",
       "Name: A, dtype: int64"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>88</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>14</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>71</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "A      88    52  48\n",
       "C       9    14  71\n",
       "E       1    71  71"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[[0,2,4]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>88</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  En\n",
       "A      88  48\n",
       "B      78  94\n",
       "C       9  71\n",
       "D      86  21"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[0:4,[0,2]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>15</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>8</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "D      86    15  21\n",
       "F     123   138  55\n",
       "I      68     8  58"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[3:8:2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### boolean索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>88</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>15</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "A      88    52  48\n",
       "D      86    15  21\n",
       "F     123   138  55\n",
       "J     100    70  63"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = df.Python > 80 # 将Python大于80分的成绩获取\n",
    "df[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "B      78    62  94\n",
       "F     123   138  55\n",
       "J     100    70  63"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = df.mean(axis = 1) > 75 # 平均分大于75，优秀，筛选出来\n",
    "df[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "F     123   138  55"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = (df.Python > 70) & (df.Math > 70)\n",
    "df[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>14</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>71</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>59</td>\n",
       "      <td>17</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "C       9    14   71\n",
       "E       1    71   71\n",
       "H      59    17  140\n",
       "K      79    37   72"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = df.index.isin(['C','E','H','K']) # 判断数据是否在数组中\n",
    "df[cond] # 删选出来了符合条件的数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 赋值操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>14</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>15</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>71</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>59</td>\n",
       "      <td>17</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>8</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A     150    52   48\n",
       "B      78    62   94\n",
       "C       9    14   71\n",
       "D      86    15   21\n",
       "E       1    71   71\n",
       "F     123   138   55\n",
       "H      59    17  140\n",
       "I      68     8   58\n",
       "J     100    70   63\n",
       "K      79    37   72"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python']['A'] = 150 # 修改某个位置的值\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>14</td>\n",
       "      <td>71</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>15</td>\n",
       "      <td>21</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>71</td>\n",
       "      <td>71</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "      <td>145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>59</td>\n",
       "      <td>17</td>\n",
       "      <td>140</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>8</td>\n",
       "      <td>58</td>\n",
       "      <td>141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>72</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    52   48    65\n",
       "B      78    62   94    25\n",
       "C       9    14   71    82\n",
       "D      86    15   21   139\n",
       "E       1    71   71    67\n",
       "F     123   138   55   145\n",
       "H      59    17  140    53\n",
       "I      68     8   58   141\n",
       "J     100    70   63    11\n",
       "K      79    37   72   127"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Java'] = np.random.randint(0,151,size = 10) # 新增加一列\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>52</td>\n",
       "      <td>48</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>147</td>\n",
       "      <td>71</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>147</td>\n",
       "      <td>21</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>147</td>\n",
       "      <td>71</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>55</td>\n",
       "      <td>145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>59</td>\n",
       "      <td>17</td>\n",
       "      <td>140</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>8</td>\n",
       "      <td>58</td>\n",
       "      <td>141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>72</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    52   48    65\n",
       "B      78    62   94    25\n",
       "C       9   147   71    82\n",
       "D      86   147   21   139\n",
       "E       1   147   71    67\n",
       "F     123   138   55   145\n",
       "H      59    17  140    53\n",
       "I      68     8   58   141\n",
       "J     100    70   63    11\n",
       "K      79    37   72   127"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[['C','D','E'],'Math'] = 147 # 修改多个人的成绩\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "cond = df < 60\n",
    "df[cond] = 60 # where 条件操作，符合这条件值，修改，不符合，不改变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>60</td>\n",
       "      <td>147</td>\n",
       "      <td>71</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>86</td>\n",
       "      <td>147</td>\n",
       "      <td>60</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>60</td>\n",
       "      <td>147</td>\n",
       "      <td>71</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>60</td>\n",
       "      <td>145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>140</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>79</td>\n",
       "      <td>60</td>\n",
       "      <td>72</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    60   60    65\n",
       "B      78    62   94    60\n",
       "C      60   147   71    82\n",
       "D      86   147   60   139\n",
       "E      60   147   71    67\n",
       "F     123   138   60   145\n",
       "H      60    60  140    60\n",
       "I      68    60   60   141\n",
       "J     100    70   63    60\n",
       "K      79    60   72   127"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.iloc[3::3,[0,2]] += 100"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78</td>\n",
       "      <td>62</td>\n",
       "      <td>94</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>60</td>\n",
       "      <td>147</td>\n",
       "      <td>71</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>186</td>\n",
       "      <td>147</td>\n",
       "      <td>160</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>60</td>\n",
       "      <td>147</td>\n",
       "      <td>71</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>123</td>\n",
       "      <td>138</td>\n",
       "      <td>60</td>\n",
       "      <td>145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>160</td>\n",
       "      <td>60</td>\n",
       "      <td>240</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>68</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>100</td>\n",
       "      <td>70</td>\n",
       "      <td>63</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>179</td>\n",
       "      <td>60</td>\n",
       "      <td>172</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    60   60    65\n",
       "B      78    62   94    60\n",
       "C      60   147   71    82\n",
       "D     186   147  160   139\n",
       "E      60   147   71    67\n",
       "F     123   138   60   145\n",
       "H     160    60  240    60\n",
       "I      68    60   60   141\n",
       "J     100    70   63    60\n",
       "K     179    60  172   127"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据集成"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### concat数据串联"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "# np.concatenate NumPy数据集成\n",
    "df1 = pd.DataFrame(np.random.randint(0,151,size = (10,3)),\n",
    "                   columns=['Python','Math','En'],\n",
    "                   index = list('ABCDEFHIJK'))\n",
    "df2 = pd.DataFrame(np.random.randint(0,151,size = (10,3)),\n",
    "                   columns = ['Python','Math','En'],\n",
    "                   index = list('QWRTUYOPLM'))\n",
    "df3 = pd.DataFrame(np.random.randint(0,151,size = (10,2)),\n",
    "                  columns=['Java','Chinese'],index = list('ABCDEFHIJK'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>108</td>\n",
       "      <td>74</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>98</td>\n",
       "      <td>16</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>71</td>\n",
       "      <td>77</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>123</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25</td>\n",
       "      <td>90</td>\n",
       "      <td>132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>105</td>\n",
       "      <td>106</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>146</td>\n",
       "      <td>42</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>83</td>\n",
       "      <td>4</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>102</td>\n",
       "      <td>79</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>92</td>\n",
       "      <td>11</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>119</td>\n",
       "      <td>59</td>\n",
       "      <td>43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>20</td>\n",
       "      <td>62</td>\n",
       "      <td>106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>77</td>\n",
       "      <td>82</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>44</td>\n",
       "      <td>119</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>49</td>\n",
       "      <td>149</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>94</td>\n",
       "      <td>90</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>105</td>\n",
       "      <td>72</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>87</td>\n",
       "      <td>109</td>\n",
       "      <td>123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>125</td>\n",
       "      <td>140</td>\n",
       "      <td>149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M</th>\n",
       "      <td>148</td>\n",
       "      <td>22</td>\n",
       "      <td>102</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A     108    74   53\n",
       "B      98    16   47\n",
       "C      71    77  128\n",
       "D       9   123  131\n",
       "E      25    90  132\n",
       "F     105   106   86\n",
       "H     146    42   81\n",
       "I      83     4   36\n",
       "J     102    79    8\n",
       "K      92    11   47\n",
       "Q     119    59   43\n",
       "W      20    62  106\n",
       "R      77    82  128\n",
       "T      44   119   15\n",
       "U      49   149   62\n",
       "Y      94    90   88\n",
       "O     105    72  133\n",
       "P      87   109  123\n",
       "L     125   140  149\n",
       "M     148    22  102"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df2],axis = 0) # axis = 0变是行合并，行增加"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "      <th>Chinese</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>108</td>\n",
       "      <td>74</td>\n",
       "      <td>53</td>\n",
       "      <td>61</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>98</td>\n",
       "      <td>16</td>\n",
       "      <td>47</td>\n",
       "      <td>117</td>\n",
       "      <td>117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>71</td>\n",
       "      <td>77</td>\n",
       "      <td>128</td>\n",
       "      <td>48</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>123</td>\n",
       "      <td>131</td>\n",
       "      <td>149</td>\n",
       "      <td>115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25</td>\n",
       "      <td>90</td>\n",
       "      <td>132</td>\n",
       "      <td>113</td>\n",
       "      <td>73</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>105</td>\n",
       "      <td>106</td>\n",
       "      <td>86</td>\n",
       "      <td>140</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>146</td>\n",
       "      <td>42</td>\n",
       "      <td>81</td>\n",
       "      <td>117</td>\n",
       "      <td>118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>83</td>\n",
       "      <td>4</td>\n",
       "      <td>36</td>\n",
       "      <td>103</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>102</td>\n",
       "      <td>79</td>\n",
       "      <td>8</td>\n",
       "      <td>43</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>92</td>\n",
       "      <td>11</td>\n",
       "      <td>47</td>\n",
       "      <td>93</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java  Chinese\n",
       "A     108    74   53    61       81\n",
       "B      98    16   47   117      117\n",
       "C      71    77  128    48        4\n",
       "D       9   123  131   149      115\n",
       "E      25    90  132   113       73\n",
       "F     105   106   86   140       26\n",
       "H     146    42   81   117      118\n",
       "I      83     4   36   103       91\n",
       "J     102    79    8    43       20\n",
       "K      92    11   47    93       72"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df3],axis = 1) # axis = 1表示列增加"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>C++</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>108</td>\n",
       "      <td>59.0</td>\n",
       "      <td>74</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>98</td>\n",
       "      <td>4.0</td>\n",
       "      <td>16</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>71</td>\n",
       "      <td>27.0</td>\n",
       "      <td>77</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>17.0</td>\n",
       "      <td>123</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25</td>\n",
       "      <td>60.0</td>\n",
       "      <td>90</td>\n",
       "      <td>132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>105</td>\n",
       "      <td>136.0</td>\n",
       "      <td>106</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>146</td>\n",
       "      <td>112.0</td>\n",
       "      <td>42</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>83</td>\n",
       "      <td>120.0</td>\n",
       "      <td>4</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>102</td>\n",
       "      <td>28.0</td>\n",
       "      <td>79</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>92</td>\n",
       "      <td>53.0</td>\n",
       "      <td>11</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>119</td>\n",
       "      <td>NaN</td>\n",
       "      <td>59</td>\n",
       "      <td>43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>62</td>\n",
       "      <td>106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>77</td>\n",
       "      <td>NaN</td>\n",
       "      <td>82</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>44</td>\n",
       "      <td>NaN</td>\n",
       "      <td>119</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>49</td>\n",
       "      <td>NaN</td>\n",
       "      <td>149</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>94</td>\n",
       "      <td>NaN</td>\n",
       "      <td>90</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>105</td>\n",
       "      <td>NaN</td>\n",
       "      <td>72</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>87</td>\n",
       "      <td>NaN</td>\n",
       "      <td>109</td>\n",
       "      <td>123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>125</td>\n",
       "      <td>NaN</td>\n",
       "      <td>140</td>\n",
       "      <td>149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M</th>\n",
       "      <td>148</td>\n",
       "      <td>NaN</td>\n",
       "      <td>22</td>\n",
       "      <td>102</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python    C++  Math   En\n",
       "A     108   59.0    74   53\n",
       "B      98    4.0    16   47\n",
       "C      71   27.0    77  128\n",
       "D       9   17.0   123  131\n",
       "E      25   60.0    90  132\n",
       "F     105  136.0   106   86\n",
       "H     146  112.0    42   81\n",
       "I      83  120.0     4   36\n",
       "J     102   28.0    79    8\n",
       "K      92   53.0    11   47\n",
       "Q     119    NaN    59   43\n",
       "W      20    NaN    62  106\n",
       "R      77    NaN    82  128\n",
       "T      44    NaN   119   15\n",
       "U      49    NaN   149   62\n",
       "Y      94    NaN    90   88\n",
       "O     105    NaN    72  133\n",
       "P      87    NaN   109  123\n",
       "L     125    NaN   140  149\n",
       "M     148    NaN    22  102"
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.append(df2) # append追加，在行后面直接进行追加"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>C++</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "      <th>Chinese</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>108.0</td>\n",
       "      <td>59.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>53.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>98.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>47.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>71.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>123.0</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>90.0</td>\n",
       "      <td>132.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>105.0</td>\n",
       "      <td>136.0</td>\n",
       "      <td>106.0</td>\n",
       "      <td>86.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>146.0</td>\n",
       "      <td>112.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>81.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>83.0</td>\n",
       "      <td>120.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>36.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>102.0</td>\n",
       "      <td>28.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>92.0</td>\n",
       "      <td>53.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>47.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>61.0</td>\n",
       "      <td>81.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>117.0</td>\n",
       "      <td>117.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>48.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>149.0</td>\n",
       "      <td>115.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>113.0</td>\n",
       "      <td>73.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>140.0</td>\n",
       "      <td>26.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>117.0</td>\n",
       "      <td>118.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>103.0</td>\n",
       "      <td>91.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>43.0</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>93.0</td>\n",
       "      <td>72.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python    C++   Math     En   Java  Chinese\n",
       "A   108.0   59.0   74.0   53.0    NaN      NaN\n",
       "B    98.0    4.0   16.0   47.0    NaN      NaN\n",
       "C    71.0   27.0   77.0  128.0    NaN      NaN\n",
       "D     9.0   17.0  123.0  131.0    NaN      NaN\n",
       "E    25.0   60.0   90.0  132.0    NaN      NaN\n",
       "F   105.0  136.0  106.0   86.0    NaN      NaN\n",
       "H   146.0  112.0   42.0   81.0    NaN      NaN\n",
       "I    83.0  120.0    4.0   36.0    NaN      NaN\n",
       "J   102.0   28.0   79.0    8.0    NaN      NaN\n",
       "K    92.0   53.0   11.0   47.0    NaN      NaN\n",
       "A     NaN    NaN    NaN    NaN   61.0     81.0\n",
       "B     NaN    NaN    NaN    NaN  117.0    117.0\n",
       "C     NaN    NaN    NaN    NaN   48.0      4.0\n",
       "D     NaN    NaN    NaN    NaN  149.0    115.0\n",
       "E     NaN    NaN    NaN    NaN  113.0     73.0\n",
       "F     NaN    NaN    NaN    NaN  140.0     26.0\n",
       "H     NaN    NaN    NaN    NaN  117.0    118.0\n",
       "I     NaN    NaN    NaN    NaN  103.0     91.0\n",
       "J     NaN    NaN    NaN    NaN   43.0     20.0\n",
       "K     NaN    NaN    NaN    NaN   93.0     72.0"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.append(df3) # 出现空数据，原因在于：df1的列索引和df3列索引不一致"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>C++</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "      <th>Chinese</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>108.0</td>\n",
       "      <td>59.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>53.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>98.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>47.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>71.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>123.0</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>90.0</td>\n",
       "      <td>132.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>105.0</td>\n",
       "      <td>136.0</td>\n",
       "      <td>106.0</td>\n",
       "      <td>86.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>146.0</td>\n",
       "      <td>112.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>81.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>83.0</td>\n",
       "      <td>120.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>36.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>102.0</td>\n",
       "      <td>28.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>92.0</td>\n",
       "      <td>53.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>47.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>61.0</td>\n",
       "      <td>81.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>117.0</td>\n",
       "      <td>117.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>48.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>149.0</td>\n",
       "      <td>115.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>113.0</td>\n",
       "      <td>73.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>140.0</td>\n",
       "      <td>26.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>117.0</td>\n",
       "      <td>118.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>103.0</td>\n",
       "      <td>91.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>43.0</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>93.0</td>\n",
       "      <td>72.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python    C++   Math     En   Java  Chinese\n",
       "A   108.0   59.0   74.0   53.0    NaN      NaN\n",
       "B    98.0    4.0   16.0   47.0    NaN      NaN\n",
       "C    71.0   27.0   77.0  128.0    NaN      NaN\n",
       "D     9.0   17.0  123.0  131.0    NaN      NaN\n",
       "E    25.0   60.0   90.0  132.0    NaN      NaN\n",
       "F   105.0  136.0  106.0   86.0    NaN      NaN\n",
       "H   146.0  112.0   42.0   81.0    NaN      NaN\n",
       "I    83.0  120.0    4.0   36.0    NaN      NaN\n",
       "J   102.0   28.0   79.0    8.0    NaN      NaN\n",
       "K    92.0   53.0   11.0   47.0    NaN      NaN\n",
       "A     NaN    NaN    NaN    NaN   61.0     81.0\n",
       "B     NaN    NaN    NaN    NaN  117.0    117.0\n",
       "C     NaN    NaN    NaN    NaN   48.0      4.0\n",
       "D     NaN    NaN    NaN    NaN  149.0    115.0\n",
       "E     NaN    NaN    NaN    NaN  113.0     73.0\n",
       "F     NaN    NaN    NaN    NaN  140.0     26.0\n",
       "H     NaN    NaN    NaN    NaN  117.0    118.0\n",
       "I     NaN    NaN    NaN    NaN  103.0     91.0\n",
       "J     NaN    NaN    NaN    NaN   43.0     20.0\n",
       "K     NaN    NaN    NaN    NaN   93.0     72.0"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df3],axis = 0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 数据插入"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>108</td>\n",
       "      <td>74</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>98</td>\n",
       "      <td>16</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>71</td>\n",
       "      <td>77</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>123</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25</td>\n",
       "      <td>90</td>\n",
       "      <td>132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>105</td>\n",
       "      <td>106</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>146</td>\n",
       "      <td>42</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>83</td>\n",
       "      <td>4</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>102</td>\n",
       "      <td>79</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>92</td>\n",
       "      <td>11</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A     108    74   53\n",
       "B      98    16   47\n",
       "C      71    77  128\n",
       "D       9   123  131\n",
       "E      25    90  132\n",
       "F     105   106   86\n",
       "H     146    42   81\n",
       "I      83     4   36\n",
       "J     102    79    8\n",
       "K      92    11   47"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df1.insert(loc = 1, # 插入位置\n",
    "           column='C++', # 插入一列，这一列名字\n",
    "           value = np.random.randint(0,151,size = 10)) # 插入的值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>C++</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>108</td>\n",
       "      <td>59</td>\n",
       "      <td>74</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>98</td>\n",
       "      <td>4</td>\n",
       "      <td>16</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>71</td>\n",
       "      <td>27</td>\n",
       "      <td>77</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>17</td>\n",
       "      <td>123</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>25</td>\n",
       "      <td>60</td>\n",
       "      <td>90</td>\n",
       "      <td>132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>105</td>\n",
       "      <td>136</td>\n",
       "      <td>106</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>146</td>\n",
       "      <td>112</td>\n",
       "      <td>42</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>83</td>\n",
       "      <td>120</td>\n",
       "      <td>4</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>102</td>\n",
       "      <td>28</td>\n",
       "      <td>79</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>92</td>\n",
       "      <td>53</td>\n",
       "      <td>11</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  C++  Math   En\n",
       "A     108   59    74   53\n",
       "B      98    4    16   47\n",
       "C      71   27    77  128\n",
       "D       9   17   123  131\n",
       "E      25   60    90  132\n",
       "F     105  136   106   86\n",
       "H     146  112    42   81\n",
       "I      83  120     4   36\n",
       "J     102   28    79    8\n",
       "K      92   53    11   47"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### Join SQL风格合并"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height\n",
       "0   softpo     175\n",
       "1  Brandon     180\n",
       "2     Ella     169\n",
       "3   Daniel     177\n",
       "4       张三     168"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>李四</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  weight\n",
       "0   softpo      70\n",
       "1  Brandon      65\n",
       "2     Ella      74\n",
       "3   Daniel      63\n",
       "4       李四      88"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>名字</th>\n",
       "      <th>salary</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        名字  salary\n",
       "0   softpo      64\n",
       "1  Brandon      48\n",
       "2     Ella      25\n",
       "3   Daniel      26\n",
       "4       张三      96"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df1 = pd.DataFrame(data = {'name':['softpo','Brandon','Ella','Daniel','张三'],\n",
    "                           'height':[175,180,169,177,168]}) # 身高\n",
    "df2 = pd.DataFrame(data = {'name':['softpo','Brandon','Ella','Daniel','李四'],\n",
    "                           'weight':[70,65,74,63,88]}) # 体重\n",
    "df3 = pd.DataFrame(data = {'名字':['softpo','Brandon','Ella','Daniel','张三'],\n",
    "                           'salary':np.random.randint(20,100,size = 5)}) # 薪水\n",
    "display(df1,df2,df3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>name</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>softpo</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>Brandon</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>Ella</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>Daniel</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "      <td>李四</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height     name  weight\n",
       "0   softpo     175   softpo      70\n",
       "1  Brandon     180  Brandon      65\n",
       "2     Ella     169     Ella      74\n",
       "3   Daniel     177   Daniel      63\n",
       "4       张三     168       李四      88"
      ]
     },
     "execution_count": 105,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df2],axis = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height  weight\n",
       "0   softpo     175      70\n",
       "1  Brandon     180      65\n",
       "2     Ella     169      74\n",
       "3   Daniel     177      63"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 根据共同的属性，合并数据\n",
    "# df1 和 df2 共同属性：name\n",
    "# 数据库，合并join 共同key\n",
    "# inner内合并\n",
    "pd.merge(df1,df2,how = 'inner') # 根据共同name进行合并，两表合并，外键"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175.0</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180.0</td>\n",
       "      <td>65.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169.0</td>\n",
       "      <td>74.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177.0</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>李四</td>\n",
       "      <td>NaN</td>\n",
       "      <td>88.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height  weight\n",
       "0   softpo   175.0    70.0\n",
       "1  Brandon   180.0    65.0\n",
       "2     Ella   169.0    74.0\n",
       "3   Daniel   177.0    63.0\n",
       "4       张三   168.0     NaN\n",
       "5       李四     NaN    88.0"
      ]
     },
     "execution_count": 107,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df1,df2,how = 'outer') # 外合并，所有数据保留，不对应位置，填充了空数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>65.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>74.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height  weight\n",
       "0   softpo     175    70.0\n",
       "1  Brandon     180    65.0\n",
       "2     Ella     169    74.0\n",
       "3   Daniel     177    63.0\n",
       "4       张三     168     NaN"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df1,df2,how = 'left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>名字</th>\n",
       "      <th>salary</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>softpo</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>Brandon</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>Ella</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>Daniel</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "      <td>张三</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height       名字  salary\n",
       "0   softpo     175   softpo      64\n",
       "1  Brandon     180  Brandon      48\n",
       "2     Ella     169     Ella      25\n",
       "3   Daniel     177   Daniel      26\n",
       "4       张三     168       张三      96"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df1,df3,left_on='name',right_on='名字')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>71</td>\n",
       "      <td>7</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>145</td>\n",
       "      <td>116</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>56</td>\n",
       "      <td>150</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>88</td>\n",
       "      <td>66</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>87</td>\n",
       "      <td>139</td>\n",
       "      <td>117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>141</td>\n",
       "      <td>45</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>93</td>\n",
       "      <td>119</td>\n",
       "      <td>114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>110</td>\n",
       "      <td>89</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2</td>\n",
       "      <td>35</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>125</td>\n",
       "      <td>59</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      71     7   89\n",
       "B     145   116   40\n",
       "C      56   150  139\n",
       "D      88    66   41\n",
       "E      87   139  117\n",
       "F     141    45   18\n",
       "H      93   119  114\n",
       "I     110    89    2\n",
       "J       2    35   96\n",
       "K     125    59    9"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df4 = pd.DataFrame(data = np.random.randint(0,151,size = (10,3)),\n",
    "                   columns=['Python','Math','En'],index = list('ABCDEFHIJK'))\n",
    "df4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     55.7\n",
       "B    100.3\n",
       "C    115.0\n",
       "D     65.0\n",
       "E    114.3\n",
       "F     68.0\n",
       "H    108.7\n",
       "I     67.0\n",
       "J     44.3\n",
       "K     64.3\n",
       "dtype: float64"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score_mean = df4.mean(axis = 1).round(1)\n",
    "score_mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df4.insert(loc = 2,column='平均分',value=score_mean)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>平均分</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>71</td>\n",
       "      <td>7</td>\n",
       "      <td>55.7</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>145</td>\n",
       "      <td>116</td>\n",
       "      <td>100.3</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>56</td>\n",
       "      <td>150</td>\n",
       "      <td>115.0</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>88</td>\n",
       "      <td>66</td>\n",
       "      <td>65.0</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>87</td>\n",
       "      <td>139</td>\n",
       "      <td>114.3</td>\n",
       "      <td>117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>141</td>\n",
       "      <td>45</td>\n",
       "      <td>68.0</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>93</td>\n",
       "      <td>119</td>\n",
       "      <td>108.7</td>\n",
       "      <td>114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>110</td>\n",
       "      <td>89</td>\n",
       "      <td>67.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2</td>\n",
       "      <td>35</td>\n",
       "      <td>44.3</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>125</td>\n",
       "      <td>59</td>\n",
       "      <td>64.3</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math    平均分   En\n",
       "A      71     7   55.7   89\n",
       "B     145   116  100.3   40\n",
       "C      56   150  115.0  139\n",
       "D      88    66   65.0   41\n",
       "E      87   139  114.3  117\n",
       "F     141    45   68.0   18\n",
       "H      93   119  108.7  114\n",
       "I     110    89   67.0    2\n",
       "J       2    35   44.3   96\n",
       "K     125    59   64.3    9"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>71</td>\n",
       "      <td>7</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>145</td>\n",
       "      <td>116</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>56</td>\n",
       "      <td>150</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>88</td>\n",
       "      <td>66</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>87</td>\n",
       "      <td>139</td>\n",
       "      <td>117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>141</td>\n",
       "      <td>45</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>93</td>\n",
       "      <td>119</td>\n",
       "      <td>114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>110</td>\n",
       "      <td>89</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2</td>\n",
       "      <td>35</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>125</td>\n",
       "      <td>59</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      71     7   89\n",
       "B     145   116   40\n",
       "C      56   150  139\n",
       "D      88    66   41\n",
       "E      87   139  117\n",
       "F     141    45   18\n",
       "H      93   119  114\n",
       "I     110    89    2\n",
       "J       2    35   96\n",
       "K     125    59    9"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df5 = df4.iloc[:,[0,1,3]]\n",
    "df5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     55.7\n",
       "B    100.3\n",
       "C    115.0\n",
       "D     65.0\n",
       "E    114.3\n",
       "F     68.0\n",
       "H    108.7\n",
       "I     67.0\n",
       "J     44.3\n",
       "K     64.3\n",
       "Name: 平均分, dtype: float64"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score_mean.name = '平均分'\n",
    "score_mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>71</td>\n",
       "      <td>7</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>145</td>\n",
       "      <td>116</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>56</td>\n",
       "      <td>150</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>88</td>\n",
       "      <td>66</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>87</td>\n",
       "      <td>139</td>\n",
       "      <td>117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>141</td>\n",
       "      <td>45</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>93</td>\n",
       "      <td>119</td>\n",
       "      <td>114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>110</td>\n",
       "      <td>89</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2</td>\n",
       "      <td>35</td>\n",
       "      <td>96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>125</td>\n",
       "      <td>59</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      71     7   89\n",
       "B     145   116   40\n",
       "C      56   150  139\n",
       "D      88    66   41\n",
       "E      87   139  117\n",
       "F     141    45   18\n",
       "H      93   119  114\n",
       "I     110    89    2\n",
       "J       2    35   96\n",
       "K     125    59    9"
      ]
     },
     "execution_count": 125,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>平均分</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>71</td>\n",
       "      <td>7</td>\n",
       "      <td>89</td>\n",
       "      <td>55.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>145</td>\n",
       "      <td>116</td>\n",
       "      <td>40</td>\n",
       "      <td>100.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>56</td>\n",
       "      <td>150</td>\n",
       "      <td>139</td>\n",
       "      <td>115.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>88</td>\n",
       "      <td>66</td>\n",
       "      <td>41</td>\n",
       "      <td>65.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>87</td>\n",
       "      <td>139</td>\n",
       "      <td>117</td>\n",
       "      <td>114.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>141</td>\n",
       "      <td>45</td>\n",
       "      <td>18</td>\n",
       "      <td>68.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>93</td>\n",
       "      <td>119</td>\n",
       "      <td>114</td>\n",
       "      <td>108.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>110</td>\n",
       "      <td>89</td>\n",
       "      <td>2</td>\n",
       "      <td>67.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2</td>\n",
       "      <td>35</td>\n",
       "      <td>96</td>\n",
       "      <td>44.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>125</td>\n",
       "      <td>59</td>\n",
       "      <td>9</td>\n",
       "      <td>64.3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En    平均分\n",
       "A      71     7   89   55.7\n",
       "B     145   116   40  100.3\n",
       "C      56   150  139  115.0\n",
       "D      88    66   41   65.0\n",
       "E      87   139  117  114.3\n",
       "F     141    45   18   68.0\n",
       "H      93   119  114  108.7\n",
       "I     110    89    2   67.0\n",
       "J       2    35   96   44.3\n",
       "K     125    59    9   64.3"
      ]
     },
     "execution_count": 126,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df5,score_mean,\n",
    "         left_index=True, # 数据合并根据行索引，对应\n",
    "         right_index=True) # 右边数据根据行索引，对应"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据清洗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "2    red     20\n",
       "3  green     18\n",
       "4  green     18\n",
       "5   blue     22\n",
       "6   None     30\n",
       "7    NaN     30\n",
       "8  green     22"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'color':['red','blue','red','green','green','blue',None,np.NaN,'green'],\n",
    "                          'price':[20,15,20,18,18,22,30,30,22]})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "3  green     18\n",
       "5   blue     22\n",
       "6   None     30\n",
       "8  green     22"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重复数据删除\n",
    "df.drop_duplicates() # 非重复数据，索引7和索引6重复数据，None和NaN一回事"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "2    red     20\n",
       "3  green     18\n",
       "4  green     18\n",
       "5   blue     22\n",
       "6   None     30\n",
       "7    NaN     30\n",
       "8  green     22"
      ]
     },
     "execution_count": 129,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "2    red     20\n",
       "3  green     18\n",
       "4  green     18\n",
       "5   blue     22\n",
       "8  green     22"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.dropna() # 空数据过滤"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "3  green     18\n",
       "5   blue     22\n",
       "7    NaN     30"
      ]
     },
     "execution_count": 131,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 删除行，或者列\n",
    "df.drop(labels=[2,4,6,8]) # 默认情况下删除行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price\n",
       "0     20\n",
       "1     15\n",
       "2     20\n",
       "3     18\n",
       "4     18\n",
       "5     22\n",
       "6     30\n",
       "7     30\n",
       "8     22"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 删除指定的列\n",
    "df.drop(labels='color',axis = 1) # 删除列，axis = 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price\n",
       "0     20\n",
       "1     15\n",
       "2     20\n",
       "3     18\n",
       "4     18\n",
       "5     22\n",
       "6     30\n",
       "7     30\n",
       "8     22"
      ]
     },
     "execution_count": 134,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.filter(items=['price']) # 参数意思，保留数据price"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price  size\n",
       "0    red     20  1024\n",
       "1   blue     15  1024\n",
       "2    red     20  1024\n",
       "3  green     18  1024\n",
       "4  green     18  1024\n",
       "5   blue     22  1024\n",
       "6   None     30  1024\n",
       "7    NaN     30  1024\n",
       "8  green     22  1024"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['size'] = 1024 # 广播\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price  size\n",
       "0     20  1024\n",
       "1     15  1024\n",
       "2     20  1024\n",
       "3     18  1024\n",
       "4     18  1024\n",
       "5     22  1024\n",
       "6     30  1024\n",
       "7     30  1024\n",
       "8     22  1024"
      ]
     },
     "execution_count": 137,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.filter(like = 'i') # 模糊匹配，保留了带有i这个字母的索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "      <th>hello</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price  size  hello\n",
       "0    red     20  1024    512\n",
       "1   blue     15  1024    512\n",
       "2    red     20  1024    512\n",
       "3  green     18  1024    512\n",
       "4  green     18  1024    512\n",
       "5   blue     22  1024    512\n",
       "6   None     30  1024    512\n",
       "7    NaN     30  1024    512\n",
       "8  green     22  1024    512"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['hello'] = 512\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price  size\n",
       "0     20  1024\n",
       "1     15  1024\n",
       "2     20  1024\n",
       "3     18  1024\n",
       "4     18  1024\n",
       "5     22  1024\n",
       "6     30  1024\n",
       "7     30  1024\n",
       "8     22  1024"
      ]
     },
     "execution_count": 143,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 正则表达式，方式很多\n",
    "df.filter(regex = 'e$') # 正则表达式，正则表达式，限制e必须在最后"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "      <th>hello</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price  size  hello\n",
       "0     20  1024    512\n",
       "1     15  1024    512\n",
       "2     20  1024    512\n",
       "3     18  1024    512\n",
       "4     18  1024    512\n",
       "5     22  1024    512\n",
       "6     30  1024    512\n",
       "7     30  1024    512\n",
       "8     22  1024    512"
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.filter(regex='e') # 只要带有e全部选出来"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([647, 871,  35, 738, 789, 587, 413, 559, 648, 993, 579, 129, 825,\n",
       "       904, 356, 316, 997, 800,  35, 601,   1, 208, 465, 614, 680, 619,\n",
       "       922, 346, 994, 135,   5, 650, 165, 475,  95, 194, 225, 455, 634,\n",
       "       717, 836, 678, 156, 203, 263, 180, 143, 248, 407,  56, 202, 947,\n",
       "        46, 408, 686, 530, 545, 273, 125, 964, 323, 775, 313, 238, 242,\n",
       "       804, 228, 322, 322, 768, 556,   9, 629, 938, 932, 859, 955, 707,\n",
       "       729, 541, 280, 493, 255, 681, 428, 992, 420, 650, 267,  32, 662,\n",
       "       185, 756, 319, 313, 271, 229, 711, 803,  85, 527, 853, 670, 685,\n",
       "       423, 458, 628, 701, 253, 495, 548, 879, 503, 115,  90, 978, 665,\n",
       "       532, 198, 482, 412, 850, 879, 913,  96, 177, 778, 337, 502, 128,\n",
       "        49, 747, 591,  22, 557, 105, 136, 775, 626, 515, 959, 869, 245,\n",
       "       437,  51, 236, 438, 489, 854,  49, 163, 687, 488, 175, 428, 517,\n",
       "       493, 377, 100, 728, 717, 926, 689, 186, 777, 639,  79,  83, 620,\n",
       "       623, 931, 918, 721, 315, 133, 423, 161, 999, 341,  55, 837, 582,\n",
       "       530, 805,  22, 301, 177, 322, 708,  14,  50, 864, 889, 929, 967,\n",
       "       497, 624, 127, 539,  14])"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 异常值过滤\n",
    "a = np.random.randint(0,1000,size = 200)\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([647, 738, 789, 587, 413, 559, 648, 579, 129, 356, 316, 800, 601,\n",
       "       208, 465, 614, 680, 619, 346, 135, 650, 165, 475, 194, 225, 455,\n",
       "       634, 717, 678, 156, 203, 263, 180, 143, 248, 407, 202, 408, 686,\n",
       "       530, 545, 273, 125, 323, 775, 313, 238, 242, 228, 322, 322, 768,\n",
       "       556, 629, 707, 729, 541, 280, 493, 255, 681, 428, 420, 650, 267,\n",
       "       662, 185, 756, 319, 313, 271, 229, 711, 527, 670, 685, 423, 458,\n",
       "       628, 701, 253, 495, 548, 503, 115, 665, 532, 198, 482, 412, 177,\n",
       "       778, 337, 502, 128, 747, 591, 557, 105, 136, 775, 626, 515, 245,\n",
       "       437, 236, 438, 489, 163, 687, 488, 175, 428, 517, 493, 377, 100,\n",
       "       728, 717, 689, 186, 777, 639, 620, 623, 721, 315, 133, 423, 161,\n",
       "       341, 582, 530, 301, 177, 322, 708, 497, 624, 127, 539])"
      ]
     },
     "execution_count": 147,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 异常值，大于800，小于 100算作异常，认为定义的。根据实际情况。\n",
    "cond = (a <=800) & (a >=100)\n",
    "a[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 148,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.17335196,  2.02215212, -0.29891071, ..., -1.6762474 ,\n",
       "       -1.27071523, -1.15187761])"
      ]
     },
     "execution_count": 148,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 正态分布，平均值是0，标准差是1\n",
    "b = np.random.randn(100000)\n",
    "b"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "$$3\\sigma$$过滤异常值 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 150,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 3.46554243,  3.08127362,  3.55119821,  3.62774922,  3.11823028,\n",
       "        3.22620922, -3.10381164, -3.20067563, -3.04607325, -3.04427703,\n",
       "        3.09111414, -3.28220862,  3.00499105, -3.06179762, -3.17331972,\n",
       "       -3.37172359,  3.93766782, -3.22895232, -3.13737479,  3.07612751,\n",
       "       -3.43215209, -3.27660651, -3.35116041,  4.74328695,  3.25586636,\n",
       "       -3.54090785,  3.08881127,  3.00635551,  3.5018534 , -3.14463788,\n",
       "       -3.0182886 , -3.12145648, -3.24276219,  3.08087834,  3.04820238,\n",
       "       -3.24173442, -3.14648209,  3.87748281, -3.07660111, -3.16083928,\n",
       "        3.32641202, -3.05228179,  3.04924043,  3.02825131, -3.08360056,\n",
       "       -3.04890894, -3.27258041, -3.07339115, -3.38375287, -3.14267022,\n",
       "       -3.7207377 ,  3.4813841 , -3.12866105, -3.17122631,  3.0599701 ,\n",
       "        3.12393087,  3.20253178, -3.05221958, -3.35532417,  3.02450167,\n",
       "       -3.28385568,  3.3422833 , -3.11052755, -3.09647003,  3.32353664,\n",
       "       -3.70215812, -3.07916575, -3.13546874,  3.20575826, -3.67982084,\n",
       "       -3.17055893,  3.4836615 , -3.30039879, -3.27774497,  3.02125912,\n",
       "        3.12332885,  3.01456477,  3.15958151, -3.34101369,  3.32444673,\n",
       "        3.06479889,  3.14506863,  3.15670827,  3.15066995,  3.14705869,\n",
       "       -3.20526898, -3.0761338 ,  3.20716127, -3.20941307, -3.7212859 ,\n",
       "       -3.51785834, -3.06096986, -3.05425748, -3.47049261,  3.22285172,\n",
       "       -3.32233224, -3.04630606,  3.41215312, -3.16482337, -3.01813609,\n",
       "       -3.05441573, -3.10394416,  3.03469642,  3.01493847, -3.11901071,\n",
       "        3.5996865 ,  3.48194227, -3.77734847,  3.04588004,  3.10611158,\n",
       "       -3.20473003, -3.4377999 ,  3.22680244, -3.1536921 , -3.22798726,\n",
       "        3.34569796,  3.06046948, -3.16955677,  3.12613756,  3.04286964,\n",
       "        3.01148054,  3.18525226, -4.08971624, -3.55427596, -5.39879049,\n",
       "        3.05203254,  3.08944491, -3.02258209,  3.17316913, -3.1615401 ,\n",
       "        3.17205118, -3.24221772, -3.14421237, -3.74675036,  3.61678522,\n",
       "        3.59097443, -3.0302881 ,  3.23236707, -3.00850012,  3.33608986,\n",
       "       -3.02859152, -3.7000766 , -3.10992575, -3.00412636, -3.05657102,\n",
       "       -3.05208781,  3.14017797,  3.46457731,  3.15619413, -3.43236114,\n",
       "        3.08259529, -3.84578168,  3.04203424, -3.29444028, -3.01764756,\n",
       "        3.11300256,  3.23071233,  3.20785451, -3.15668756,  3.44176099,\n",
       "       -3.19985577, -3.14126853, -3.26482841, -3.62208271, -3.55305069,\n",
       "        3.09639491, -3.18178713, -3.03662021,  3.17247227,  3.3908074 ,\n",
       "       -3.63563705, -3.56417097,  3.02823554, -3.06955375,  3.74305364,\n",
       "        3.63993306, -3.14193492, -3.04032527, -3.28310908, -3.37949723,\n",
       "       -3.25915912, -3.01206123, -3.10871377, -3.22982732,  3.8136103 ,\n",
       "        3.48893313,  3.9918267 ,  3.4526763 , -3.46595488, -3.29996013,\n",
       "       -3.42965097,  3.151502  ,  3.10548689, -3.44707735,  3.21881565,\n",
       "        3.50932999, -3.12410382,  3.30296386,  3.02454576, -3.20072608,\n",
       "        3.54339754, -3.17847739, -3.21475045,  3.03546088, -3.06225619,\n",
       "        3.48158164,  3.15243123, -3.06358376,  3.27300242,  3.32577453,\n",
       "        3.23535167, -3.04681725,  3.33439387,  3.10620079,  3.52883469,\n",
       "       -3.1790272 ,  3.02641222, -3.45636819,  3.21009424,  3.08045954,\n",
       "       -3.59721754,  3.24693695,  3.05920919, -3.43674159, -3.00370946,\n",
       "       -3.48031594, -3.28748467,  3.42581649,  3.46912521, -3.28384157,\n",
       "        3.76358974, -3.34035865,  3.12978233,  3.44856854, -3.04074246,\n",
       "        3.50018071,  3.33188267, -3.09775514, -3.49356906, -3.09902374,\n",
       "        3.12068562, -3.1776565 , -3.44282129,  3.19286374, -3.28304596,\n",
       "       -3.10080963, -3.37189709,  3.77743156,  3.03547536,  3.22045459,\n",
       "       -3.44007263,  3.01331408,  3.49733677,  3.28831922,  3.62147013,\n",
       "        3.03458981,  3.15447237, -3.33931478,  3.09858431, -3.23592306,\n",
       "        3.3144797 ,  3.37067342, -3.18749118,  3.09319307, -3.34390567,\n",
       "        3.29819563,  3.3120354 ,  3.04166958, -3.00975323,  3.0347423 ,\n",
       "       -3.82502331, -3.13125028, -3.0876424 ,  3.13929221,  3.570775  ,\n",
       "       -3.37420738,  3.17527797,  3.13396148, -3.70088631, -3.04054948,\n",
       "        3.05399103,  3.24908851,  3.19666266, -3.64071456, -3.85271081,\n",
       "        3.06864652,  3.53367592,  3.54650649,  3.6355438 ,  3.657715  ,\n",
       "        4.03831601,  3.61651925])"
      ]
     },
     "execution_count": 150,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = np.abs(b) > 3*1 # 这些异常值，找到了\n",
    "b[cond]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据转换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 轴和元素转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       2           5      3\n",
       "B       5           0      0\n",
       "C       7           0      4\n",
       "D       0           4      7\n",
       "E       8           6      9\n",
       "F       8           2      6\n",
       "H       6           7      8\n",
       "I       7           6      9\n",
       "J       4           7      9\n",
       "K       6           7      1"
      ]
     },
     "execution_count": 152,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = np.random.randint(0,10,size = (10,3)),\n",
    "                  columns=['Python','Tensorflow','Keras'],\n",
    "                  index = list('ABCDEFHIJK'))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.rename(index = {'A':'X','K':'Y'}, # 行索引\n",
    "          columns={'Python':'人工智能'}, # 列索引修改\n",
    "          inplace=True) # 替换原数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>2</td>\n",
       "      <td>50</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>50</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow  Keras\n",
       "X     2          50      3\n",
       "B    50           0      0\n",
       "C     7           0      4\n",
       "D     0           4      7\n",
       "E     8           6      9\n",
       "F     8           2      6\n",
       "H     6           7      8\n",
       "I     7           6      9\n",
       "J     4           7      9\n",
       "Y     6           7      1"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace(5,50,inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>50</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>50</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1024</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1024</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>1024</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow  Keras\n",
       "X  1024          50      3\n",
       "B    50           0      0\n",
       "C  1024           0      4\n",
       "D     0           4   1024\n",
       "E     8           6      9\n",
       "F     8        1024      6\n",
       "H     6        1024      8\n",
       "I  1024           6      9\n",
       "J     4        1024      9\n",
       "Y     6        1024      1"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace([2,7],1024,inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 160,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.iloc[4,2] = np.NaN # 空数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>50</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>50</td>\n",
       "      <td>2048</td>\n",
       "      <td>2048.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1024</td>\n",
       "      <td>2048</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>2048</td>\n",
       "      <td>4</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>-100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1024</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>1024</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras\n",
       "X  1024          50     3.0\n",
       "B    50        2048  2048.0\n",
       "C  1024        2048     4.0\n",
       "D  2048           4  1024.0\n",
       "E     8           6  -100.0\n",
       "F     8        1024     6.0\n",
       "H     6        1024     8.0\n",
       "I  1024           6     9.0\n",
       "J     4        1024     9.0\n",
       "Y     6        1024     1.0"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace({0:2048,np.nan:-100},inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>50</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>50</td>\n",
       "      <td>2048</td>\n",
       "      <td>2048.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1024</td>\n",
       "      <td>2048</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>2048</td>\n",
       "      <td>4</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>-100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>8</td>\n",
       "      <td>-1024</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>6</td>\n",
       "      <td>-1024</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1024</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>-1024</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>-1024</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras\n",
       "X  1024          50     3.0\n",
       "B    50        2048  2048.0\n",
       "C  1024        2048     4.0\n",
       "D  2048           4  1024.0\n",
       "E     8           6  -100.0\n",
       "F     8       -1024     6.0\n",
       "H     6       -1024     8.0\n",
       "I  1024           6     9.0\n",
       "J     4       -1024     9.0\n",
       "Y     6       -1024     1.0"
      ]
     },
     "execution_count": 163,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace({'Tensorflow':1024},-1024) # 指定某一列，进行数据替换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### map映射元素转变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X       3.140\n",
       "B         NaN\n",
       "C       3.140\n",
       "D       2.718\n",
       "E         NaN\n",
       "F         NaN\n",
       "H    1108.000\n",
       "I       3.140\n",
       "J         NaN\n",
       "Y    1108.000\n",
       "Name: 人工智能, dtype: float64"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# map 只能针对一列，就是Series\n",
    "# 有一些没有对应，那么返回就是空数据\n",
    "df['人工智能'].map({1024:3.14,2048:2.718,6:1108}) # 跟据字典对数据进行改变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X     True\n",
       "B     True\n",
       "C     True\n",
       "D     True\n",
       "E    False\n",
       "F     True\n",
       "H     True\n",
       "I     True\n",
       "J     True\n",
       "Y     True\n",
       "Name: Keras, dtype: bool"
      ]
     },
     "execution_count": 168,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Keras'].map(lambda x :True if x > 0 else False) # 如果大于 0 返回True，不然返回False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>50</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>50</td>\n",
       "      <td>2048</td>\n",
       "      <td>2048.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1024</td>\n",
       "      <td>2048</td>\n",
       "      <td>4.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>2048</td>\n",
       "      <td>4</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>-100.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>6.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>8.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1024</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>1024</td>\n",
       "      <td>9.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras  level\n",
       "X  1024          50     3.0  False\n",
       "B    50        2048  2048.0   True\n",
       "C  1024        2048     4.0   True\n",
       "D  2048           4  1024.0  False\n",
       "E     8           6  -100.0  False\n",
       "F     8        1024     6.0   True\n",
       "H     6        1024     8.0   True\n",
       "I  1024           6     9.0  False\n",
       "J     4        1024     9.0   True\n",
       "Y     6        1024     1.0   True"
      ]
     },
     "execution_count": 171,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def convert(x):\n",
    "    if x >= 1024:\n",
    "        return True\n",
    "    else:\n",
    "        return False\n",
    "df['level'] = df['Tensorflow'].map(convert) # map映射，映射是Tensorflow中这一列中每一个数据，传递到方法中\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### apply映射元素转变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 174,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X    1124\n",
       "B     150\n",
       "C    1124\n",
       "D    2148\n",
       "E     108\n",
       "F     108\n",
       "H     106\n",
       "I    1124\n",
       "J     104\n",
       "Y     106\n",
       "Name: 人工智能, dtype: int64"
      ]
     },
     "execution_count": 174,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 既可以操作Series又可以操作DataFrame\n",
    "df['人工智能'].apply(lambda x : x + 100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X    0\n",
       "B    1\n",
       "C    1\n",
       "D    0\n",
       "E    0\n",
       "F    1\n",
       "H    1\n",
       "I    0\n",
       "J    1\n",
       "Y    1\n",
       "Name: level, dtype: int64"
      ]
     },
     "execution_count": 177,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['level'].apply(lambda x:1 if x else 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>2024</td>\n",
       "      <td>1050</td>\n",
       "      <td>1003.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>1050</td>\n",
       "      <td>3048</td>\n",
       "      <td>3048.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2024</td>\n",
       "      <td>3048</td>\n",
       "      <td>1004.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>3048</td>\n",
       "      <td>1004</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1008</td>\n",
       "      <td>1006</td>\n",
       "      <td>900.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>1008</td>\n",
       "      <td>2024</td>\n",
       "      <td>1006.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>1006</td>\n",
       "      <td>2024</td>\n",
       "      <td>1008.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>2024</td>\n",
       "      <td>1006</td>\n",
       "      <td>1009.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1004</td>\n",
       "      <td>2024</td>\n",
       "      <td>1009.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>1006</td>\n",
       "      <td>2024</td>\n",
       "      <td>1001.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras  level\n",
       "X  2024        1050  1003.0   1000\n",
       "B  1050        3048  3048.0   1001\n",
       "C  2024        3048  1004.0   1001\n",
       "D  3048        1004  2024.0   1000\n",
       "E  1008        1006   900.0   1000\n",
       "F  1008        2024  1006.0   1001\n",
       "H  1006        2024  1008.0   1001\n",
       "I  2024        1006  1009.0   1000\n",
       "J  1004        2024  1009.0   1001\n",
       "Y  1006        2024  1001.0   1001"
      ]
     },
     "execution_count": 180,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply(lambda x : x + 1000) # apply对 所有的数据进行映射"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>29.0</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>10.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>-100.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2048.0</td>\n",
       "      <td>2048.0</td>\n",
       "      <td>2048.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>717.8</td>\n",
       "      <td>800.4</td>\n",
       "      <td>694.9</td>\n",
       "      <td>0.516398</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     人工智能  Tensorflow   Keras     level\n",
       "0    29.0      1024.0     7.0         1\n",
       "1    10.0        10.0    10.0        10\n",
       "2     4.0         4.0  -100.0     False\n",
       "3  2048.0      2048.0  2048.0      True\n",
       "4   717.8       800.4   694.9  0.516398"
      ]
     },
     "execution_count": 183,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def convert(x):\n",
    "    return (x.median(),x.count(),x.min(),x.max(),x.std()) # 返回中位数，返回的是计数\n",
    "df.apply(convert).round(1) # 默认操作列数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 185,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>50</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>50</td>\n",
       "      <td>2048</td>\n",
       "      <td>2048.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1024</td>\n",
       "      <td>2048</td>\n",
       "      <td>4.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>2048</td>\n",
       "      <td>4</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>-100.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>6.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>8.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1024</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>1024</td>\n",
       "      <td>9.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras  level\n",
       "X  1024          50     3.0  False\n",
       "B    50        2048  2048.0   True\n",
       "C  1024        2048     4.0   True\n",
       "D  2048           4  1024.0  False\n",
       "E     8           6  -100.0  False\n",
       "F     8        1024     6.0   True\n",
       "H     6        1024     8.0   True\n",
       "I  1024           6     9.0  False\n",
       "J     4        1024     9.0   True\n",
       "Y     6        1024     1.0   True"
      ]
     },
     "execution_count": 185,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 184,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X     (26.5, 4, False, 1024, 503.68732033541073)\n",
       "B    (1049.0, 4, True, 2048, 1167.8622564326668)\n",
       "C      (514.0, 4, True, 2048, 979.1007353689405)\n",
       "D     (514.0, 4, False, 2048, 979.3623776042588)\n",
       "E        (3.0, 4, -100.0, 8, 52.443620520834884)\n",
       "F        (7.0, 4, True, 1024, 509.5085049993441)\n",
       "H        (7.0, 4, True, 1024, 509.5085049993441)\n",
       "I         (7.5, 4, False, 1024, 509.51373877453)\n",
       "J        (6.5, 4, True, 1024, 509.6773489179208)\n",
       "Y         (3.5, 4, 1.0, 1024, 510.6721061503164)\n",
       "dtype: object"
      ]
     },
     "execution_count": 184,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply(convert,axis = 1) # axis = 1，操作数据就是行数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### transform元素转变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       1           1      9\n",
       "B       6           9      1\n",
       "C       1           4      6\n",
       "D       9           5      1\n",
       "E       4           1      8\n",
       "F       2           5      7\n",
       "H       7           2      3\n",
       "I       7           8      9\n",
       "J       5           4      2\n",
       "K       7           0      7"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "A   -1024\n",
       "B    1024\n",
       "C   -1024\n",
       "D    1024\n",
       "E   -1024\n",
       "F   -1024\n",
       "H    1024\n",
       "I    1024\n",
       "J   -1024\n",
       "K    1024\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 186,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,10,size = (10,3)),\n",
    "                  columns=['Python','Tensorflow','Keras'],\n",
    "                  index = list('ABCDEFHIJK'))\n",
    "display(df)\n",
    "# 可以针对一列数据，Series进行运算\n",
    "df['Python'].transform(lambda x : 1024 if x > 5 else -1024) # 这个功能和map，apply类似的"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sqrt</th>\n",
       "      <th>square</th>\n",
       "      <th>cumsum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>81</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>16</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>1.414214</td>\n",
       "      <td>4</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>2.828427</td>\n",
       "      <td>64</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>16</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       sqrt  square  cumsum\n",
       "A  1.000000       1       1\n",
       "B  3.000000      81      10\n",
       "C  2.000000      16      14\n",
       "D  2.236068      25      19\n",
       "E  1.000000       1      20\n",
       "F  2.236068      25      25\n",
       "H  1.414214       4      27\n",
       "I  2.828427      64      35\n",
       "J  2.000000      16      39\n",
       "K  0.000000       0      39"
      ]
     },
     "execution_count": 190,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Tensorflow'].apply([np.sqrt,np.square,np.cumsum]) # 针对一列，进行不同的操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sqrt</th>\n",
       "      <th>square</th>\n",
       "      <th>cumsum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>81</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>16</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>1.414214</td>\n",
       "      <td>4</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>2.828427</td>\n",
       "      <td>64</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>16</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       sqrt  square  cumsum\n",
       "A  1.000000       1       1\n",
       "B  3.000000      81      10\n",
       "C  2.000000      16      14\n",
       "D  2.236068      25      19\n",
       "E  1.000000       1      20\n",
       "F  2.236068      25      25\n",
       "H  1.414214       4      27\n",
       "I  2.828427      64      35\n",
       "J  2.000000      16      39\n",
       "K  0.000000       0      39"
      ]
     },
     "execution_count": 191,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Tensorflow'].transform([np.sqrt,np.square,np.cumsum]) # 针对一列，进行不同的操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>81</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>8</td>\n",
       "      <td>16</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>17</td>\n",
       "      <td>25</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>23</td>\n",
       "      <td>25</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>30</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>37</td>\n",
       "      <td>64</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>42</td>\n",
       "      <td>16</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>49</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       1           1   True\n",
       "B       7          81  False\n",
       "C       8          16   True\n",
       "D      17          25  False\n",
       "E      21           1   True\n",
       "F      23          25   True\n",
       "H      30           4  False\n",
       "I      37          64   True\n",
       "J      42          16  False\n",
       "K      49           0   True"
      ]
     },
     "execution_count": 192,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def convert(x):\n",
    "    if x > 5:\n",
    "        return True\n",
    "    else:\n",
    "        return False\n",
    "# 可以针对DataFrame进行运算\n",
    "df.transform({'Python':np.cumsum,'Tensorflow':np.square,'Keras':convert}) # 对不同的列，执行不同的操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>81</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>8</td>\n",
       "      <td>16</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>17</td>\n",
       "      <td>25</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>23</td>\n",
       "      <td>25</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>30</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>37</td>\n",
       "      <td>64</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>42</td>\n",
       "      <td>16</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>49</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       1           1   True\n",
       "B       7          81  False\n",
       "C       8          16   True\n",
       "D      17          25  False\n",
       "E      21           1   True\n",
       "F      23          25   True\n",
       "H      30           4  False\n",
       "I      37          64   True\n",
       "J      42          16  False\n",
       "K      49           0   True"
      ]
     },
     "execution_count": 193,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply({'Python':np.cumsum,'Tensorflow':np.square,'Keras':convert}) # 对不同的列，执行不同的操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 重排随机抽样哑变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       1           1      9\n",
       "B       6           9      1\n",
       "C       1           4      6\n",
       "D       9           5      1\n",
       "E       4           1      8\n",
       "F       2           5      7\n",
       "H       7           2      3\n",
       "I       7           8      9\n",
       "J       5           4      2\n",
       "K       7           0      7"
      ]
     },
     "execution_count": 194,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3, 4, 1, 2, 7, 9, 0, 8, 5, 6])"
      ]
     },
     "execution_count": 199,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "index = np.random.permutation(10) # 返回打乱顺讯的索引\n",
    "index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "D       9           5      1\n",
       "E       4           1      8\n",
       "B       6           9      1\n",
       "C       1           4      6\n",
       "I       7           8      9\n",
       "K       7           0      7\n",
       "A       1           1      9\n",
       "J       5           4      2\n",
       "F       2           5      7\n",
       "H       7           2      3"
      ]
     },
     "execution_count": 200,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重排，索引打乱\n",
    "df.take(index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "J       5           4      2\n",
       "J       5           4      2\n",
       "D       9           5      1\n",
       "K       7           0      7\n",
       "H       7           2      3\n",
       "I       7           8      9\n",
       "J       5           4      2\n",
       "A       1           1      9\n",
       "C       1           4      6\n",
       "J       5           4      2\n",
       "I       7           8      9\n",
       "D       9           5      1\n",
       "I       7           8      9\n",
       "K       7           0      7\n",
       "A       1           1      9\n",
       "B       6           9      1\n",
       "H       7           2      3\n",
       "D       9           5      1\n",
       "B       6           9      1\n",
       "H       7           2      3"
      ]
     },
     "execution_count": 201,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 从大量数据中随机抽取数据\n",
    "df.take(np.random.randint(0,10,size = 20)) # 随机抽样20个数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>key</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>c</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>c</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  key\n",
       "0   a\n",
       "1   b\n",
       "2   a\n",
       "3   b\n",
       "4   c\n",
       "5   b\n",
       "6   c"
      ]
     },
     "execution_count": 202,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(data = {'key':['a','b','a','b','c','b','c']})\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 204,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "      <th>b</th>\n",
       "      <th>c</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   a  b  c\n",
       "0  1  0  0\n",
       "1  0  1  0\n",
       "2  1  0  0\n",
       "3  0  1  0\n",
       "4  0  0  1\n",
       "5  0  1  0\n",
       "6  0  0  1"
      ]
     },
     "execution_count": 204,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# one-hot,哑变量\n",
    "# str类型数据，经过哑变量变换可以使用数字表示\n",
    "pd.get_dummies(df2,prefix='',prefix_sep='') # 1表示，有；0表示，没有"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据重塑"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 205,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       1           1      9\n",
       "B       6           9      1\n",
       "C       1           4      6\n",
       "D       9           5      1\n",
       "E       4           1      8\n",
       "F       2           5      7\n",
       "H       7           2      3\n",
       "I       7           8      9\n",
       "J       5           4      2\n",
       "K       7           0      7"
      ]
     },
     "execution_count": 205,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 207,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>E</th>\n",
       "      <th>F</th>\n",
       "      <th>H</th>\n",
       "      <th>I</th>\n",
       "      <th>J</th>\n",
       "      <th>K</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tensorflow</th>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Keras</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            A  B  C  D  E  F  H  I  J  K\n",
       "Python      1  6  1  9  4  2  7  7  5  7\n",
       "Tensorflow  1  9  4  5  1  5  2  8  4  0\n",
       "Keras       9  1  6  1  8  7  3  9  2  7"
      ]
     },
     "execution_count": 207,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.T # 转置，行变列，列变行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 208,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">A</th>\n",
       "      <th>期中</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">B</th>\n",
       "      <th>期中</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">C</th>\n",
       "      <th>期中</th>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">D</th>\n",
       "      <th>期中</th>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">E</th>\n",
       "      <th>期中</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">F</th>\n",
       "      <th>期中</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">H</th>\n",
       "      <th>期中</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">I</th>\n",
       "      <th>期中</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">J</th>\n",
       "      <th>期中</th>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">K</th>\n",
       "      <th>期中</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Python  Math  En\n",
       "A 期中       3     3   0\n",
       "  期末       6     5   8\n",
       "B 期中       5     5   9\n",
       "  期末       7     5   2\n",
       "C 期中       0     7   9\n",
       "  期末       9     7   5\n",
       "D 期中       5     6   5\n",
       "  期末       7     9   6\n",
       "E 期中       7     3   9\n",
       "  期末       9     1   4\n",
       "F 期中       9     9   5\n",
       "  期末       0     8   9\n",
       "H 期中       7     0   0\n",
       "  期末       1     6   6\n",
       "I 期中       8     1   8\n",
       "  期末       7     9   9\n",
       "J 期中       5     0   8\n",
       "  期末       3     6   6\n",
       "K 期中       8     2   2\n",
       "  期末       3     5   2"
      ]
     },
     "execution_count": 208,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(np.random.randint(0,10,size = (20,3)),\n",
    "                   columns=['Python','Math','En'],\n",
    "                   index = pd.MultiIndex.from_product([list('ABCDEFHIJK'),['期中','期末']])) # 多层索引\n",
    "\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 211,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"2\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  Python    Math    En   \n",
       "      期中 期末   期中 期末 期中 期末\n",
       "A      3  6    3  5  0  8\n",
       "B      5  7    5  5  9  2\n",
       "C      0  9    7  7  9  5\n",
       "D      5  7    6  9  5  6\n",
       "E      7  9    3  1  9  4\n",
       "F      9  0    9  8  5  9\n",
       "H      7  1    0  6  0  6\n",
       "I      8  7    1  9  8  9\n",
       "J      5  3    0  6  8  6\n",
       "K      8  3    2  5  2  2"
      ]
     },
     "execution_count": 211,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.unstack(level = 1) # 将行索引变成列索引,-1表示最后一层"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 212,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"2\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  Python    Math    En   \n",
       "      期中 期末   期中 期末 期中 期末\n",
       "A      3  6    3  5  0  8\n",
       "B      5  7    5  5  9  2\n",
       "C      0  9    7  7  9  5\n",
       "D      5  7    6  9  5  6\n",
       "E      7  9    3  1  9  4\n",
       "F      9  0    9  8  5  9\n",
       "H      7  1    0  6  0  6\n",
       "I      8  7    1  9  8  9\n",
       "J      5  3    0  6  8  6\n",
       "K      8  3    2  5  2  2"
      ]
     },
     "execution_count": 212,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.unstack(level = -1) # 将行索引变成列索引,-1表示最后一层"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 213,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A  期中  Python    3\n",
       "       Math      3\n",
       "       En        0\n",
       "   期末  Python    6\n",
       "       Math      5\n",
       "       En        8\n",
       "B  期中  Python    5\n",
       "       Math      5\n",
       "       En        9\n",
       "   期末  Python    7\n",
       "       Math      5\n",
       "       En        2\n",
       "C  期中  Python    0\n",
       "       Math      7\n",
       "       En        9\n",
       "   期末  Python    9\n",
       "       Math      7\n",
       "       En        5\n",
       "D  期中  Python    5\n",
       "       Math      6\n",
       "       En        5\n",
       "   期末  Python    7\n",
       "       Math      9\n",
       "       En        6\n",
       "E  期中  Python    7\n",
       "       Math      3\n",
       "       En        9\n",
       "   期末  Python    9\n",
       "       Math      1\n",
       "       En        4\n",
       "F  期中  Python    9\n",
       "       Math      9\n",
       "       En        5\n",
       "   期末  Python    0\n",
       "       Math      8\n",
       "       En        9\n",
       "H  期中  Python    7\n",
       "       Math      0\n",
       "       En        0\n",
       "   期末  Python    1\n",
       "       Math      6\n",
       "       En        6\n",
       "I  期中  Python    8\n",
       "       Math      1\n",
       "       En        8\n",
       "   期末  Python    7\n",
       "       Math      9\n",
       "       En        9\n",
       "J  期中  Python    5\n",
       "       Math      0\n",
       "       En        8\n",
       "   期末  Python    3\n",
       "       Math      6\n",
       "       En        6\n",
       "K  期中  Python    8\n",
       "       Math      2\n",
       "       En        2\n",
       "   期末  Python    3\n",
       "       Math      5\n",
       "       En        2\n",
       "dtype: int64"
      ]
     },
     "execution_count": 213,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.stack() # 列变成行了"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">A</th>\n",
       "      <th>En</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">B</th>\n",
       "      <th>En</th>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">C</th>\n",
       "      <th>En</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">D</th>\n",
       "      <th>En</th>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">E</th>\n",
       "      <th>En</th>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">F</th>\n",
       "      <th>En</th>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">H</th>\n",
       "      <th>En</th>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">I</th>\n",
       "      <th>En</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">J</th>\n",
       "      <th>En</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">K</th>\n",
       "      <th>En</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          期中  期末\n",
       "A En       0   8\n",
       "  Math     3   5\n",
       "  Python   3   6\n",
       "B En       9   2\n",
       "  Math     5   5\n",
       "  Python   5   7\n",
       "C En       9   5\n",
       "  Math     7   7\n",
       "  Python   0   9\n",
       "D En       5   6\n",
       "  Math     6   9\n",
       "  Python   5   7\n",
       "E En       9   4\n",
       "  Math     3   1\n",
       "  Python   7   9\n",
       "F En       5   9\n",
       "  Math     9   8\n",
       "  Python   9   0\n",
       "H En       0   6\n",
       "  Math     0   6\n",
       "  Python   7   1\n",
       "I En       8   9\n",
       "  Math     1   9\n",
       "  Python   8   7\n",
       "J En       8   6\n",
       "  Math     0   6\n",
       "  Python   5   3\n",
       "K En       2   2\n",
       "  Math     2   5\n",
       "  Python   8   3"
      ]
     },
     "execution_count": 215,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.unstack().stack(level = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    5.45\n",
       "Math      4.85\n",
       "En        5.60\n",
       "dtype: float64"
      ]
     },
     "execution_count": 217,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean() # 计算的是 列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A  期中    2.000000\n",
       "   期末    6.333333\n",
       "B  期中    6.333333\n",
       "   期末    4.666667\n",
       "C  期中    5.333333\n",
       "   期末    7.000000\n",
       "D  期中    5.333333\n",
       "   期末    7.333333\n",
       "E  期中    6.333333\n",
       "   期末    4.666667\n",
       "F  期中    7.666667\n",
       "   期末    5.666667\n",
       "H  期中    2.333333\n",
       "   期末    4.333333\n",
       "I  期中    5.666667\n",
       "   期末    8.333333\n",
       "J  期中    4.333333\n",
       "   期末    5.000000\n",
       "K  期中    4.000000\n",
       "   期末    3.333333\n",
       "dtype: float64"
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean(axis = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 220,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>期中</th>\n",
       "      <td>5.7</td>\n",
       "      <td>3.6</td>\n",
       "      <td>5.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>5.2</td>\n",
       "      <td>6.1</td>\n",
       "      <td>5.7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "期中     5.7   3.6  5.5\n",
       "期末     5.2   6.1  5.7"
      ]
     },
     "execution_count": 220,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean(level=1) # 计算期中期末所有学生的平均分"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 221,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>4.5</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>6.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>4.5</td>\n",
       "      <td>7.0</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6.0</td>\n",
       "      <td>7.5</td>\n",
       "      <td>5.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>6.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>4.5</td>\n",
       "      <td>8.5</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7.5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>8.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>5.5</td>\n",
       "      <td>3.5</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A     4.5   4.0  4.0\n",
       "B     6.0   5.0  5.5\n",
       "C     4.5   7.0  7.0\n",
       "D     6.0   7.5  5.5\n",
       "E     8.0   2.0  6.5\n",
       "F     4.5   8.5  7.0\n",
       "H     4.0   3.0  3.0\n",
       "I     7.5   5.0  8.5\n",
       "J     4.0   3.0  7.0\n",
       "K     5.5   3.5  2.0"
      ]
     },
     "execution_count": 221,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean(level = 0) # 计算每位学生期中和期末平均分"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数学和统计方法"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 简单统计指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 262,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "Q       1     4   3\n",
       "W       8     2   0\n",
       "E       3     0   9\n",
       "R       9     8   9\n",
       "T       9     1   3\n",
       "Y       5     3   1\n",
       "U       5     8   0\n",
       "I       1     8   3\n",
       "O       0     3   5\n",
       "P       6     6   1\n",
       "A       0     4   0\n",
       "S       3     9   4\n",
       "D       5     2   8\n",
       "F       2     9   2\n",
       "G       1     9   8\n",
       "H       9     5   2\n",
       "J       5     7   5\n",
       "K       2     6   5\n",
       "L       2     7   3\n",
       "Z       2     9   8"
      ]
     },
     "execution_count": 262,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,10,size = (20,3)),\n",
    "                  columns=['Python','Math','En'],index = list('QWERTYUIOPASDFGHJKLZ'))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 263,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q       1     4  3.0\n",
       "W       8     2  0.0\n",
       "E       3     0  9.0\n",
       "R       9     8  9.0\n",
       "T       9     1  3.0\n",
       "Y       5     3  1.0\n",
       "U       5     8  NaN\n",
       "I       1     8  3.0\n",
       "O       0     3  5.0\n",
       "P       6     6  1.0\n",
       "A       0     4  0.0\n",
       "S       3     9  4.0\n",
       "D       5     2  8.0\n",
       "F       2     9  2.0\n",
       "G       1     9  8.0\n",
       "H       9     5  2.0\n",
       "J       5     7  5.0\n",
       "K       2     6  5.0\n",
       "L       2     7  3.0\n",
       "Z       2     9  8.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.iloc[6,2] = np.NAN\n",
    "display(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 264,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    20\n",
       "Math      20\n",
       "En        19\n",
       "dtype: int64"
      ]
     },
     "execution_count": 264,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.count() # 统计非空数据数量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 265,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    3.900000\n",
       "Math      5.500000\n",
       "En        4.157895\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "Python    3.0\n",
       "Math      6.0\n",
       "En        3.0\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df.mean(),df.median()) # 平均值，中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 266,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    0.0\n",
       "Math      0.0\n",
       "En        0.0\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "Python    9.0\n",
       "Math      9.0\n",
       "En        9.0\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df.min(),df.max()) # 最小值，最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 267,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 8, 3, 9, 5, 0, 6, 2])"
      ]
     },
     "execution_count": 267,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'].unique() # 去除重复数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9    4\n",
       "8    3\n",
       "7    2\n",
       "6    2\n",
       "4    2\n",
       "3    2\n",
       "2    2\n",
       "5    1\n",
       "1    1\n",
       "0    1\n",
       "Name: Math, dtype: int64"
      ]
     },
     "execution_count": 269,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Math'].value_counts() # 统计出现的频次"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 271,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0.00</th>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.25</th>\n",
       "      <td>1.75</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.50</th>\n",
       "      <td>3.00</td>\n",
       "      <td>6.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.75</th>\n",
       "      <td>5.25</td>\n",
       "      <td>8.0</td>\n",
       "      <td>6.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.00</th>\n",
       "      <td>9.00</td>\n",
       "      <td>9.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Python  Math   En\n",
       "0.00    0.00   0.0  0.0\n",
       "0.25    1.75   3.0  2.0\n",
       "0.50    3.00   6.0  3.0\n",
       "0.75    5.25   8.0  6.5\n",
       "1.00    9.00   9.0  9.0"
      ]
     },
     "execution_count": 271,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.quantile(q = [0,0.25,0.5,0.75,1]) # 百分位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 273,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>20.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>19.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>3.9</td>\n",
       "      <td>5.5</td>\n",
       "      <td>4.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>3.0</td>\n",
       "      <td>2.9</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.8</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>3.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>5.2</td>\n",
       "      <td>8.0</td>\n",
       "      <td>6.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>9.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Python  Math    En\n",
       "count    20.0  20.0  19.0\n",
       "mean      3.9   5.5   4.2\n",
       "std       3.0   2.9   3.0\n",
       "min       0.0   0.0   0.0\n",
       "25%       1.8   3.0   2.0\n",
       "50%       3.0   6.0   3.0\n",
       "75%       5.2   8.0   6.5\n",
       "max       9.0   9.0   9.0"
      ]
     },
     "execution_count": 273,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe().round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 索引标签、位置获取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 274,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 274,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'].argmax() # 返回最大值索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 276,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 276,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['En'].argmin() # 最小值索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 277,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    R\n",
       "Math      S\n",
       "En        E\n",
       "dtype: object"
      ]
     },
     "execution_count": 277,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.idxmax() # 返回最大值的标签"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 278,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    O\n",
       "Math      E\n",
       "En        W\n",
       "dtype: object"
      ]
     },
     "execution_count": 278,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.idxmin() # 返回最小值标签"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 更多统计指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 279,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>12.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>21</td>\n",
       "      <td>14</td>\n",
       "      <td>21.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>30</td>\n",
       "      <td>15</td>\n",
       "      <td>24.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>35</td>\n",
       "      <td>18</td>\n",
       "      <td>25.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>40</td>\n",
       "      <td>26</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>41</td>\n",
       "      <td>34</td>\n",
       "      <td>28.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>41</td>\n",
       "      <td>37</td>\n",
       "      <td>33.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>47</td>\n",
       "      <td>43</td>\n",
       "      <td>34.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>47</td>\n",
       "      <td>47</td>\n",
       "      <td>34.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>50</td>\n",
       "      <td>56</td>\n",
       "      <td>38.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>55</td>\n",
       "      <td>58</td>\n",
       "      <td>46.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>57</td>\n",
       "      <td>67</td>\n",
       "      <td>48.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>58</td>\n",
       "      <td>76</td>\n",
       "      <td>56.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>67</td>\n",
       "      <td>81</td>\n",
       "      <td>58.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>72</td>\n",
       "      <td>88</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>74</td>\n",
       "      <td>94</td>\n",
       "      <td>68.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>76</td>\n",
       "      <td>101</td>\n",
       "      <td>71.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>78</td>\n",
       "      <td>110</td>\n",
       "      <td>79.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math    En\n",
       "Q       1     4   3.0\n",
       "W       9     6   3.0\n",
       "E      12     6  12.0\n",
       "R      21    14  21.0\n",
       "T      30    15  24.0\n",
       "Y      35    18  25.0\n",
       "U      40    26   NaN\n",
       "I      41    34  28.0\n",
       "O      41    37  33.0\n",
       "P      47    43  34.0\n",
       "A      47    47  34.0\n",
       "S      50    56  38.0\n",
       "D      55    58  46.0\n",
       "F      57    67  48.0\n",
       "G      58    76  56.0\n",
       "H      67    81  58.0\n",
       "J      72    88  63.0\n",
       "K      74    94  68.0\n",
       "L      76   101  71.0\n",
       "Z      78   110  79.0"
      ]
     },
     "execution_count": 279,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cumsum() # 累加和"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 280,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>24</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>216</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1944</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>9720</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>48600</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>48600</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q       1     4  3.0\n",
       "W       8     8  0.0\n",
       "E      24     0  0.0\n",
       "R     216     0  0.0\n",
       "T    1944     0  0.0\n",
       "Y    9720     0  0.0\n",
       "U   48600     0  NaN\n",
       "I   48600     0  0.0\n",
       "O       0     0  0.0\n",
       "P       0     0  0.0\n",
       "A       0     0  0.0\n",
       "S       0     0  0.0\n",
       "D       0     0  0.0\n",
       "F       0     0  0.0\n",
       "G       0     0  0.0\n",
       "H       0     0  0.0\n",
       "J       0     0  0.0\n",
       "K       0     0  0.0\n",
       "L       0     0  0.0\n",
       "Z       0     0  0.0"
      ]
     },
     "execution_count": 280,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cumprod() # 累乘和"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 281,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q       1     4  3.0\n",
       "W       1     2  0.0\n",
       "E       1     0  0.0\n",
       "R       1     0  0.0\n",
       "T       1     0  0.0\n",
       "Y       1     0  0.0\n",
       "U       1     0  NaN\n",
       "I       1     0  0.0\n",
       "O       0     0  0.0\n",
       "P       0     0  0.0\n",
       "A       0     0  0.0\n",
       "S       0     0  0.0\n",
       "D       0     0  0.0\n",
       "F       0     0  0.0\n",
       "G       0     0  0.0\n",
       "H       0     0  0.0\n",
       "J       0     0  0.0\n",
       "K       0     0  0.0\n",
       "L       0     0  0.0\n",
       "Z       0     0  0.0"
      ]
     },
     "execution_count": 281,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cummin() # 累计最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 283,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q       1     4  3.0\n",
       "W       8     4  3.0\n",
       "E       8     4  9.0\n",
       "R       9     8  9.0\n",
       "T       9     8  9.0\n",
       "Y       9     8  9.0\n",
       "U       9     8  NaN\n",
       "I       9     8  9.0\n",
       "O       9     8  9.0\n",
       "P       9     8  9.0\n",
       "A       9     8  9.0\n",
       "S       9     9  9.0\n",
       "D       9     9  9.0\n",
       "F       9     9  9.0\n",
       "G       9     9  9.0\n",
       "H       9     9  9.0\n",
       "J       9     9  9.0\n",
       "K       9     9  9.0\n",
       "L       9     9  9.0\n",
       "Z       9     9  9.0"
      ]
     },
     "execution_count": 283,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cummax() # 累计最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 284,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    3.041814\n",
       "Math      2.946898\n",
       "En        3.004869\n",
       "dtype: float64"
      ]
     },
     "execution_count": 284,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.std() # 标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 285,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    9.252632\n",
       "Math      8.684211\n",
       "En        9.029240\n",
       "dtype: float64"
      ]
     },
     "execution_count": 285,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.var()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 286,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>7.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>-5.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>6.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>0.0</td>\n",
       "      <td>-7.0</td>\n",
       "      <td>-6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>-4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>-2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>0.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>-4.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>-1.0</td>\n",
       "      <td>-5.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>6.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>-4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>-6.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>3.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>2.0</td>\n",
       "      <td>-7.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>-3.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>-6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>8.0</td>\n",
       "      <td>-4.0</td>\n",
       "      <td>-6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>-4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>-3.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q     NaN   NaN  NaN\n",
       "W     7.0  -2.0 -3.0\n",
       "E    -5.0  -2.0  9.0\n",
       "R     6.0   8.0  0.0\n",
       "T     0.0  -7.0 -6.0\n",
       "Y    -4.0   2.0 -2.0\n",
       "U     0.0   5.0  NaN\n",
       "I    -4.0   0.0  NaN\n",
       "O    -1.0  -5.0  2.0\n",
       "P     6.0   3.0 -4.0\n",
       "A    -6.0  -2.0 -1.0\n",
       "S     3.0   5.0  4.0\n",
       "D     2.0  -7.0  4.0\n",
       "F    -3.0   7.0 -6.0\n",
       "G    -1.0   0.0  6.0\n",
       "H     8.0  -4.0 -6.0\n",
       "J    -4.0   2.0  3.0\n",
       "K    -3.0  -1.0  0.0\n",
       "L     0.0   1.0 -2.0\n",
       "Z     0.0   2.0  5.0"
      ]
     },
     "execution_count": 286,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.diff() # 差分，当前数据减去上一个的差值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 292,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>7.000</td>\n",
       "      <td>-0.500</td>\n",
       "      <td>-1.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>-0.625</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>inf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>2.000</td>\n",
       "      <td>inf</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>0.000</td>\n",
       "      <td>-0.875</td>\n",
       "      <td>-0.667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>-0.444</td>\n",
       "      <td>2.000</td>\n",
       "      <td>-0.667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>0.000</td>\n",
       "      <td>1.667</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>-0.800</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>-1.000</td>\n",
       "      <td>-0.625</td>\n",
       "      <td>0.667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>inf</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>-1.000</td>\n",
       "      <td>-0.333</td>\n",
       "      <td>-1.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>inf</td>\n",
       "      <td>1.250</td>\n",
       "      <td>inf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0.667</td>\n",
       "      <td>-0.778</td>\n",
       "      <td>1.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>-0.600</td>\n",
       "      <td>3.500</td>\n",
       "      <td>-0.750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>-0.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>3.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>8.000</td>\n",
       "      <td>-0.444</td>\n",
       "      <td>-0.750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>-0.444</td>\n",
       "      <td>0.400</td>\n",
       "      <td>1.500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>-0.600</td>\n",
       "      <td>-0.143</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>0.000</td>\n",
       "      <td>0.167</td>\n",
       "      <td>-0.400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>0.000</td>\n",
       "      <td>0.286</td>\n",
       "      <td>1.667</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   Math     En\n",
       "Q     NaN    NaN    NaN\n",
       "W   7.000 -0.500 -1.000\n",
       "E  -0.625 -1.000    inf\n",
       "R   2.000    inf  0.000\n",
       "T   0.000 -0.875 -0.667\n",
       "Y  -0.444  2.000 -0.667\n",
       "U   0.000  1.667  0.000\n",
       "I  -0.800  0.000  2.000\n",
       "O  -1.000 -0.625  0.667\n",
       "P     inf  1.000 -0.800\n",
       "A  -1.000 -0.333 -1.000\n",
       "S     inf  1.250    inf\n",
       "D   0.667 -0.778  1.000\n",
       "F  -0.600  3.500 -0.750\n",
       "G  -0.500  0.000  3.000\n",
       "H   8.000 -0.444 -0.750\n",
       "J  -0.444  0.400  1.500\n",
       "K  -0.600 -0.143  0.000\n",
       "L   0.000  0.167 -0.400\n",
       "Z   0.000  0.286  1.667"
      ]
     },
     "execution_count": 292,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.pct_change().round(3) # 计算百分比变化"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 高级统计指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 293,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>9.252632</td>\n",
       "      <td>-2.157895</td>\n",
       "      <td>-0.695906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>-2.157895</td>\n",
       "      <td>8.684211</td>\n",
       "      <td>1.160819</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>En</th>\n",
       "      <td>-0.695906</td>\n",
       "      <td>1.160819</td>\n",
       "      <td>9.029240</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python      Math        En\n",
       "Python  9.252632 -2.157895 -0.695906\n",
       "Math   -2.157895  8.684211  1.160819\n",
       "En     -0.695906  1.160819  9.029240"
      ]
     },
     "execution_count": 293,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cov() # 协方差：自己和别人计算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 294,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    9.252632\n",
       "Math      8.684211\n",
       "En        9.029240\n",
       "dtype: float64"
      ]
     },
     "execution_count": 294,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.var() # 方差： 自己和自己计算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 295,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-2.157894736842105"
      ]
     },
     "execution_count": 295,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'].cov(df['Math'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 296,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>-0.240731</td>\n",
       "      <td>-0.074376</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>-0.240731</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.130217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>En</th>\n",
       "      <td>-0.074376</td>\n",
       "      <td>0.130217</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python      Math        En\n",
       "Python  1.000000 -0.240731 -0.074376\n",
       "Math   -0.240731  1.000000  0.130217\n",
       "En     -0.074376  0.130217  1.000000"
      ]
     },
     "execution_count": 296,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.corr() # 相关性系数 -1 ~ 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 297,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python   -0.074376\n",
       "Math      0.130217\n",
       "En        1.000000\n",
       "dtype: float64"
      ]
     },
     "execution_count": 297,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.corrwith(df['En']) # 一列的相关性系数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 299,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>13</td>\n",
       "      <td>18</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>12</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>11</td>\n",
       "      <td>15</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>4</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>15</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>8</td>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>4</td>\n",
       "      <td>17</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "Q      17           3      4\n",
       "W      13          18      7\n",
       "E      12          11      0\n",
       "R       3           5     14\n",
       "T      11          15      7\n",
       "Y       5          15      4\n",
       "U      18           2      7\n",
       "I       7           3      6\n",
       "O       1          18      5\n",
       "P      12           6      0\n",
       "A       4          18      4\n",
       "S      15           5      8\n",
       "D       8          11     14\n",
       "F       3           2     17\n",
       "G       4          17      8\n",
       "H      12           1      4\n",
       "J       1           2      6\n",
       "K      17           9     16\n",
       "L      11          14      4\n",
       "Z      16          13      4"
      ]
     },
     "execution_count": 299,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,20,size = (20,3)),\n",
    "                  columns=['Python','Tensorflow','Keras'],index = list('QWERTYUIOPASDFGHJKLZ'))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 300,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>13</td>\n",
       "      <td>18</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>11</td>\n",
       "      <td>15</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>15</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>4</td>\n",
       "      <td>17</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>12</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>8</td>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>4</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "Z      16          13      4\n",
       "Y       5          15      4\n",
       "W      13          18      7\n",
       "U      18           2      7\n",
       "T      11          15      7\n",
       "S      15           5      8\n",
       "R       3           5     14\n",
       "Q      17           3      4\n",
       "P      12           6      0\n",
       "O       1          18      5\n",
       "L      11          14      4\n",
       "K      17           9     16\n",
       "J       1           2      6\n",
       "I       7           3      6\n",
       "H      12           1      4\n",
       "G       4          17      8\n",
       "F       3           2     17\n",
       "E      12          11      0\n",
       "D       8          11     14\n",
       "A       4          18      4"
      ]
     },
     "execution_count": 300,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_index(axis = 0,ascending=False) # 降序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 301,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>4</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>8</td>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>12</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>4</td>\n",
       "      <td>17</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>15</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>11</td>\n",
       "      <td>15</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>13</td>\n",
       "      <td>18</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       4          18      4\n",
       "D       8          11     14\n",
       "E      12          11      0\n",
       "F       3           2     17\n",
       "G       4          17      8\n",
       "H      12           1      4\n",
       "I       7           3      6\n",
       "J       1           2      6\n",
       "K      17           9     16\n",
       "L      11          14      4\n",
       "O       1          18      5\n",
       "P      12           6      0\n",
       "Q      17           3      4\n",
       "R       3           5     14\n",
       "S      15           5      8\n",
       "T      11          15      7\n",
       "U      18           2      7\n",
       "W      13          18      7\n",
       "Y       5          15      4\n",
       "Z      16          13      4"
      ]
     },
     "execution_count": 301,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_index(ascending=True) # 升序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 302,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>4</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>4</td>\n",
       "      <td>17</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>8</td>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>11</td>\n",
       "      <td>15</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>12</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>13</td>\n",
       "      <td>18</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>15</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "J       1           2      6\n",
       "O       1          18      5\n",
       "R       3           5     14\n",
       "F       3           2     17\n",
       "A       4          18      4\n",
       "G       4          17      8\n",
       "Y       5          15      4\n",
       "I       7           3      6\n",
       "D       8          11     14\n",
       "T      11          15      7\n",
       "L      11          14      4\n",
       "P      12           6      0\n",
       "E      12          11      0\n",
       "H      12           1      4\n",
       "W      13          18      7\n",
       "S      15           5      8\n",
       "Z      16          13      4\n",
       "K      17           9     16\n",
       "Q      17           3      4\n",
       "U      18           2      7"
      ]
     },
     "execution_count": 302,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_values(by = 'Python',ascending=True) # 根据Python属性进行升序排列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 303,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>4</td>\n",
       "      <td>17</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>4</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>8</td>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>11</td>\n",
       "      <td>15</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>12</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>13</td>\n",
       "      <td>18</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>15</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "J       1           2      6\n",
       "O       1          18      5\n",
       "F       3           2     17\n",
       "R       3           5     14\n",
       "G       4          17      8\n",
       "A       4          18      4\n",
       "Y       5          15      4\n",
       "I       7           3      6\n",
       "D       8          11     14\n",
       "L      11          14      4\n",
       "T      11          15      7\n",
       "H      12           1      4\n",
       "P      12           6      0\n",
       "E      12          11      0\n",
       "W      13          18      7\n",
       "S      15           5      8\n",
       "Z      16          13      4\n",
       "Q      17           3      4\n",
       "K      17           9     16\n",
       "U      18           2      7"
      ]
     },
     "execution_count": 303,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_values(by = ['Python','Tensorflow'],ascending=True) \n",
    "# 先根据Python进行排序，如果相等在根据Tensorflow排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 304,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>15</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "U      18           2      7\n",
       "Q      17           3      4\n",
       "K      17           9     16\n",
       "Z      16          13      4\n",
       "S      15           5      8"
      ]
     },
     "execution_count": 304,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.nlargest(n = 5,columns='Python') # 根据Python进行排序，获取最大的5个数值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 305,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>12</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>5</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>4</td>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "E      12          11      0\n",
       "P      12           6      0\n",
       "Q      17           3      4\n",
       "Y       5          15      4\n",
       "A       4          18      4"
      ]
     },
     "execution_count": 305,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.nsmallest(5,columns='Keras') # 根据Keras进行排序，获取最小的5个"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 分箱操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 306,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>8</td>\n",
       "      <td>29</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>143</td>\n",
       "      <td>67</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>145</td>\n",
       "      <td>90</td>\n",
       "      <td>51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>79</td>\n",
       "      <td>114</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>124</td>\n",
       "      <td>120</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>111</td>\n",
       "      <td>133</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>113</td>\n",
       "      <td>128</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>48</td>\n",
       "      <td>139</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>46</td>\n",
       "      <td>1</td>\n",
       "      <td>93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>87</td>\n",
       "      <td>127</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0        8    29  135\n",
       "1      143    67   64\n",
       "2      145    90   51\n",
       "3       79   114   31\n",
       "4      124   120   49\n",
       "..     ...   ...  ...\n",
       "95     111   133   79\n",
       "96     113   128    7\n",
       "97      48   139   77\n",
       "98      46     1   93\n",
       "99      87   127   14\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 306,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,151,size = (100,3)),\n",
    "                  columns=['Python','Math','En'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 309,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0      (1.852, 39.0]\n",
       "1     (113.0, 150.0]\n",
       "2     (113.0, 150.0]\n",
       "3      (76.0, 113.0]\n",
       "4     (113.0, 150.0]\n",
       "           ...      \n",
       "95     (76.0, 113.0]\n",
       "96     (76.0, 113.0]\n",
       "97      (39.0, 76.0]\n",
       "98      (39.0, 76.0]\n",
       "99     (76.0, 113.0]\n",
       "Name: Python, Length: 100, dtype: category\n",
       "Categories (4, interval[float64]): [(1.852, 39.0] < (39.0, 76.0] < (76.0, 113.0] < (113.0, 150.0]]"
      ]
     },
     "execution_count": 309,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 等宽\n",
    "pd.cut(df.Python,\n",
    "       bins = 4, # 等宽分成四份\n",
    "       labels=['不及格','及格','中等','优秀'],\n",
    "       right = True)# 区间，闭区间"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 316,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "优秀     30\n",
       "中等     29\n",
       "及格     21\n",
       "不及格    20\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 316,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.cut(df.Python,\n",
    "       bins = 4, # 等宽分成四份\n",
    "       labels=['不及格','及格','中等','优秀'],\n",
    "       right = True).value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 311,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>等级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>8</td>\n",
       "      <td>29</td>\n",
       "      <td>135</td>\n",
       "      <td>极差</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>143</td>\n",
       "      <td>67</td>\n",
       "      <td>64</td>\n",
       "      <td>优秀</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>145</td>\n",
       "      <td>90</td>\n",
       "      <td>51</td>\n",
       "      <td>优秀</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>79</td>\n",
       "      <td>114</td>\n",
       "      <td>31</td>\n",
       "      <td>及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>124</td>\n",
       "      <td>120</td>\n",
       "      <td>49</td>\n",
       "      <td>优秀</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>111</td>\n",
       "      <td>133</td>\n",
       "      <td>79</td>\n",
       "      <td>中等</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>113</td>\n",
       "      <td>128</td>\n",
       "      <td>7</td>\n",
       "      <td>中等</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>48</td>\n",
       "      <td>139</td>\n",
       "      <td>77</td>\n",
       "      <td>不及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>46</td>\n",
       "      <td>1</td>\n",
       "      <td>93</td>\n",
       "      <td>不及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>87</td>\n",
       "      <td>127</td>\n",
       "      <td>14</td>\n",
       "      <td>及格</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En   等级\n",
       "0        8    29  135   极差\n",
       "1      143    67   64   优秀\n",
       "2      145    90   51   优秀\n",
       "3       79   114   31   及格\n",
       "4      124   120   49   优秀\n",
       "..     ...   ...  ...  ...\n",
       "95     111   133   79   中等\n",
       "96     113   128    7   中等\n",
       "97      48   139   77  不及格\n",
       "98      46     1   93  不及格\n",
       "99      87   127   14   及格\n",
       "\n",
       "[100 rows x 4 columns]"
      ]
     },
     "execution_count": 311,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['等级'] = pd.cut(df.Python,\n",
    "       bins = [0,30,60,90,120,150],\n",
    "       labels=['极差','不及格','及格','中等','优秀'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 315,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "优秀     25\n",
       "中等     25\n",
       "及格     25\n",
       "不及格    25\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 315,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 等频\n",
    "pd.qcut(df.Python,q = 4,labels=['不及格','及格','中等','优秀']).value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 分组聚合"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 320,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>7</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   0  1  2\n",
       "0  1  1  6\n",
       "1  4  6  0\n",
       "2  7  5  0\n",
       "3  8  2  3\n",
       "4  9  5  6\n",
       "5  4  2  9\n",
       "6  7  5  2\n",
       "7  3  3  4\n",
       "8  4  4  3\n",
       "9  7  4  4"
      ]
     },
     "execution_count": 320,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.DataFrame(np.random.randint(0,10,size = (10,3)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 323,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>男</td>\n",
       "      <td>2</td>\n",
       "      <td>46</td>\n",
       "      <td>96</td>\n",
       "      <td>148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>男</td>\n",
       "      <td>8</td>\n",
       "      <td>122</td>\n",
       "      <td>141</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>女</td>\n",
       "      <td>7</td>\n",
       "      <td>144</td>\n",
       "      <td>8</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>女</td>\n",
       "      <td>1</td>\n",
       "      <td>58</td>\n",
       "      <td>78</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>女</td>\n",
       "      <td>6</td>\n",
       "      <td>86</td>\n",
       "      <td>70</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>男</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>141</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>女</td>\n",
       "      <td>4</td>\n",
       "      <td>65</td>\n",
       "      <td>118</td>\n",
       "      <td>106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>男</td>\n",
       "      <td>6</td>\n",
       "      <td>14</td>\n",
       "      <td>148</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>女</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>46</td>\n",
       "      <td>132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>男</td>\n",
       "      <td>8</td>\n",
       "      <td>61</td>\n",
       "      <td>34</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    sex  class  Python  Math   En\n",
       "0     男      2      46    96  148\n",
       "1     男      8     122   141   67\n",
       "2     女      7     144     8   31\n",
       "3     女      1      58    78   94\n",
       "4     女      6      86    70   62\n",
       "..   ..    ...     ...   ...  ...\n",
       "295   男      7       1   141   82\n",
       "296   女      4      65   118  106\n",
       "297   男      6      14   148   55\n",
       "298   女      5       7    46  132\n",
       "299   男      8      61    34   46\n",
       "\n",
       "[300 rows x 5 columns]"
      ]
     },
     "execution_count": 323,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'sex':np.random.randint(0,2,size = 300),\n",
    "                          'class':np.random.randint(1,9,size = 300),\n",
    "                          'Python':np.random.randint(0,151,size = 300),\n",
    "                          'Math':np.random.randint(0,151,size = 300),\n",
    "                          'En':np.random.randint(0,151,size = 300)})\n",
    "df['sex'] = df['sex'].map({0:'男',1:'女'})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 325,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "    sex  class  Python  Math   En\n",
      "2     女      7     144     8   31\n",
      "3     女      1      58    78   94\n",
      "4     女      6      86    70   62\n",
      "5     女      2       3   101   40\n",
      "6     女      8      87    60  141\n",
      "..   ..    ...     ...   ...  ...\n",
      "282   女      6      32    86   72\n",
      "284   女      2      41    17   61\n",
      "288   女      6       9    82   87\n",
      "296   女      4      65   118  106\n",
      "298   女      5       7    46  132\n",
      "\n",
      "[139 rows x 5 columns]\n",
      "男\n",
      "    sex  class  Python  Math   En\n",
      "0     男      2      46    96  148\n",
      "1     男      8     122   141   67\n",
      "8     男      2      65    13  117\n",
      "12    男      5      50    46  134\n",
      "13    男      2      95    29  139\n",
      "..   ..    ...     ...   ...  ...\n",
      "293   男      7      61    43   11\n",
      "294   男      5      78    47  143\n",
      "295   男      7       1   141   82\n",
      "297   男      6      14   148   55\n",
      "299   男      8      61    34   46\n",
      "\n",
      "[161 rows x 5 columns]\n"
     ]
    }
   ],
   "source": [
    "# 单分组\n",
    "for name,group in df.groupby(by = 'sex'): # 分两组\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 326,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)\n",
      "    sex  class  Python  Math   En\n",
      "3     女      1      58    78   94\n",
      "26    女      1      33    22   84\n",
      "62    女      1      64   128  134\n",
      "71    女      1      77     6  116\n",
      "78    女      1      81   145  113\n",
      "80    女      1     147    27  145\n",
      "81    女      1     137    83  101\n",
      "89    女      1     140    46  129\n",
      "100   女      1     144   126   10\n",
      "113   女      1       8    15  123\n",
      "126   女      1       1     7   58\n",
      "130   女      1      30   133   24\n",
      "156   女      1     114   125   87\n",
      "197   女      1      14   118  144\n",
      "211   女      1     140    23   57\n",
      "231   女      1     106    90   50\n",
      "232   女      1      20   132   81\n",
      "250   女      1      74    38   86\n",
      "251   女      1      52     3  129\n",
      "256   女      1       4    82  104\n",
      "263   女      1      73   125  115\n",
      "('女', 2)\n",
      "    sex  class  Python  Math   En\n",
      "5     女      2       3   101   40\n",
      "9     女      2      83   110   74\n",
      "11    女      2     141    88   12\n",
      "29    女      2     128    44   16\n",
      "67    女      2      40   122   72\n",
      "76    女      2     143   127    5\n",
      "90    女      2     120    84   48\n",
      "98    女      2      40    74   62\n",
      "112   女      2      97    35   55\n",
      "149   女      2      19   149   65\n",
      "165   女      2       5    29   98\n",
      "175   女      2     112   124   95\n",
      "178   女      2      42   101   21\n",
      "240   女      2      46    58   85\n",
      "241   女      2     145   122  104\n",
      "243   女      2     135   100  120\n",
      "262   女      2      34    68   87\n",
      "270   女      2      96   128   46\n",
      "278   女      2      44    19  107\n",
      "284   女      2      41    17   61\n",
      "('女', 3)\n",
      "    sex  class  Python  Math   En\n",
      "7     女      3      57    66  139\n",
      "24    女      3      65    75  149\n",
      "39    女      3     101    68   62\n",
      "55    女      3      56     2   48\n",
      "61    女      3      38    39  114\n",
      "88    女      3     100    50  112\n",
      "101   女      3      21    72  102\n",
      "102   女      3      49    22   27\n",
      "122   女      3      96   121  110\n",
      "128   女      3      52    46  138\n",
      "150   女      3     150    86    1\n",
      "159   女      3       2   140   34\n",
      "160   女      3      84   127   70\n",
      "162   女      3      19   110   93\n",
      "163   女      3      40   127   96\n",
      "173   女      3     146   109   48\n",
      "207   女      3      56    58   76\n",
      "('女', 4)\n",
      "    sex  class  Python  Math   En\n",
      "10    女      4     148    41   69\n",
      "15    女      4     119   133   55\n",
      "54    女      4       9    40   95\n",
      "57    女      4     115   106   45\n",
      "65    女      4     145    60   22\n",
      "74    女      4      12   131   31\n",
      "84    女      4       1   110   79\n",
      "93    女      4      14    64   45\n",
      "106   女      4      73   139   90\n",
      "115   女      4      84   107    2\n",
      "117   女      4       6    62  124\n",
      "186   女      4      71    49  123\n",
      "193   女      4      51   109   13\n",
      "199   女      4      66   143   81\n",
      "206   女      4     106    59    7\n",
      "226   女      4      11   125   71\n",
      "276   女      4      28    40   46\n",
      "296   女      4      65   118  106\n",
      "('女', 5)\n",
      "    sex  class  Python  Math   En\n",
      "21    女      5      70    68   41\n",
      "82    女      5      19    98   51\n",
      "87    女      5      34    94   88\n",
      "107   女      5      64    19  142\n",
      "114   女      5     129    33   14\n",
      "141   女      5      91    49  141\n",
      "188   女      5     138    89   25\n",
      "194   女      5      45    47   84\n",
      "195   女      5      24     1  133\n",
      "228   女      5     130   100  131\n",
      "230   女      5      46   138   33\n",
      "234   女      5     144   140   66\n",
      "237   女      5      48    84   80\n",
      "255   女      5       8    61  133\n",
      "298   女      5       7    46  132\n",
      "('女', 6)\n",
      "    sex  class  Python  Math   En\n",
      "4     女      6      86    70   62\n",
      "32    女      6     112   128   32\n",
      "33    女      6     129    30   38\n",
      "43    女      6     140   150   95\n",
      "77    女      6      48   104  130\n",
      "152   女      6      94    19  127\n",
      "181   女      6     119    83   16\n",
      "203   女      6     118   104   67\n",
      "210   女      6      87    58    2\n",
      "238   女      6     113   131   44\n",
      "260   女      6      56    48  116\n",
      "282   女      6      32    86   72\n",
      "288   女      6       9    82   87\n",
      "('女', 7)\n",
      "    sex  class  Python  Math   En\n",
      "2     女      7     144     8   31\n",
      "16    女      7     142    12   57\n",
      "40    女      7     107   113  124\n",
      "59    女      7      78   142   30\n",
      "64    女      7       3   128   72\n",
      "96    女      7      10    68    2\n",
      "104   女      7      57    85   66\n",
      "105   女      7      53    73   79\n",
      "108   女      7     103   135    2\n",
      "151   女      7     122    12   92\n",
      "174   女      7     101   105   85\n",
      "192   女      7     108    68  140\n",
      "221   女      7      59    74    1\n",
      "225   女      7      95    52   98\n",
      "246   女      7     122    82   96\n",
      "257   女      7     103    49   30\n",
      "266   女      7      87   130   54\n",
      "267   女      7     145    99   27\n",
      "271   女      7      99    58  111\n",
      "('女', 8)\n",
      "    sex  class  Python  Math   En\n",
      "6     女      8      87    60  141\n",
      "34    女      8      38    98  139\n",
      "46    女      8      28    31    3\n",
      "53    女      8     125   130   51\n",
      "56    女      8     109    88   30\n",
      "63    女      8      34    35  145\n",
      "70    女      8      52    34   16\n",
      "95    女      8       1    12   88\n",
      "103   女      8      51    42   44\n",
      "118   女      8      31   107   15\n",
      "144   女      8      27   144   61\n",
      "176   女      8      64    13  127\n",
      "196   女      8      52     6   44\n",
      "222   女      8      19   115   81\n",
      "252   女      8     106    29   26\n",
      "265   女      8      41   137   12\n",
      "('男', 1)\n",
      "    sex  class  Python  Math   En\n",
      "69    男      1     143    24   78\n",
      "72    男      1      32    59  148\n",
      "85    男      1      43     9    3\n",
      "99    男      1      12    52   41\n",
      "110   男      1      67   136    7\n",
      "137   男      1     128    95    1\n",
      "142   男      1      36   142   68\n",
      "148   男      1      66   100   51\n",
      "153   男      1     124    40  132\n",
      "200   男      1       6    74  122\n",
      "209   男      1      18    74  133\n",
      "212   男      1     129    15   73\n",
      "213   男      1      21    43   59\n",
      "244   男      1      26    60   74\n",
      "259   男      1      67    28   89\n",
      "268   男      1      68    49   29\n",
      "269   男      1      92   129   28\n",
      "273   男      1      18    97  114\n",
      "281   男      1      86   149   55\n",
      "292   男      1       1   107   67\n",
      "('男', 2)\n",
      "    sex  class  Python  Math   En\n",
      "0     男      2      46    96  148\n",
      "8     男      2      65    13  117\n",
      "13    男      2      95    29  139\n",
      "27    男      2      49    11  134\n",
      "31    男      2     133   149   75\n",
      "38    男      2      61   145   40\n",
      "49    男      2     131   133  100\n",
      "52    男      2      45    67   37\n",
      "58    男      2      27   122   18\n",
      "94    男      2      85   135   22\n",
      "109   男      2     102    78   86\n",
      "120   男      2     118    72   59\n",
      "123   男      2     111   148  140\n",
      "125   男      2      42   109   41\n",
      "146   男      2      17    53    3\n",
      "177   男      2      16   137   79\n",
      "189   男      2      51    49  139\n",
      "198   男      2      83    60   15\n",
      "217   男      2     112    64   12\n",
      "248   男      2      89   111   72\n",
      "249   男      2     147   104  127\n",
      "254   男      2      13    12   12\n",
      "264   男      2     122   148  141\n",
      "279   男      2     121    85   26\n",
      "('男', 3)\n",
      "    sex  class  Python  Math   En\n",
      "25    男      3      44     6  109\n",
      "68    男      3      49    97   74\n",
      "79    男      3      34    39  106\n",
      "129   男      3     143    16  129\n",
      "134   男      3     131    20   12\n",
      "161   男      3     131   143   39\n",
      "169   男      3      91    60   67\n",
      "170   男      3     112   150  135\n",
      "180   男      3      45   106   62\n",
      "187   男      3     111    44   24\n",
      "218   男      3     150    14   22\n",
      "219   男      3      73     1   81\n",
      "224   男      3      47    27    7\n",
      "239   男      3      86     5  112\n",
      "242   男      3      25    44  124\n",
      "245   男      3      72   145   61\n",
      "272   男      3      57   143   59\n",
      "291   男      3      67   117  120\n",
      "('男', 4)\n",
      "    sex  class  Python  Math   En\n",
      "14    男      4     124   113   76\n",
      "17    男      4     124    60   19\n",
      "18    男      4     150    32   63\n",
      "23    男      4      65    74   23\n",
      "36    男      4      62     8   10\n",
      "47    男      4     112     9    7\n",
      "75    男      4      95    92   52\n",
      "91    男      4      77     0   74\n",
      "92    男      4     104   118   73\n",
      "111   男      4     138    52   70\n",
      "116   男      4     106    46   80\n",
      "124   男      4       3   101   76\n",
      "140   男      4     110    63  113\n",
      "157   男      4     102    65  117\n",
      "179   男      4     127    61   85\n",
      "214   男      4     108   123  119\n",
      "227   男      4     124    86   78\n",
      "247   男      4     134    85   66\n",
      "261   男      4       2   114  138\n",
      "275   男      4      57    65  129\n",
      "283   男      4     127    29    5\n",
      "290   男      4     133   113   73\n",
      "('男', 5)\n",
      "    sex  class  Python  Math   En\n",
      "12    男      5      50    46  134\n",
      "37    男      5       0   143   59\n",
      "41    男      5       3    64   46\n",
      "51    男      5      38    20  122\n",
      "60    男      5      92   132  134\n",
      "73    男      5      49    31  125\n",
      "155   男      5       6    63  109\n",
      "164   男      5      89    54   93\n",
      "171   男      5     144   122   75\n",
      "184   男      5      98    24  147\n",
      "201   男      5     132    80  106\n",
      "202   男      5      96    29  150\n",
      "216   男      5      79    96   57\n",
      "233   男      5      34    90  114\n",
      "277   男      5      37   111   24\n",
      "285   男      5      95    43    9\n",
      "294   男      5      78    47  143\n",
      "('男', 6)\n",
      "    sex  class  Python  Math   En\n",
      "28    男      6      46    35   22\n",
      "30    男      6     105    88  123\n",
      "35    男      6     112     1   37\n",
      "45    男      6      39    35  105\n",
      "48    男      6      89    49   27\n",
      "50    男      6      90   134   51\n",
      "83    男      6      53     6   21\n",
      "97    男      6      24    40  137\n",
      "119   男      6      13    20  140\n",
      "127   男      6      48   145    3\n",
      "132   男      6      82   129  138\n",
      "139   男      6      19   104  129\n",
      "143   男      6     103     4  104\n",
      "158   男      6     105    66  111\n",
      "182   男      6      17   136  113\n",
      "185   男      6      23   117    2\n",
      "191   男      6     137    53   56\n",
      "215   男      6      66   140   64\n",
      "235   男      6     110   112  135\n",
      "236   男      6      68    44   67\n",
      "253   男      6      38   131   88\n",
      "274   男      6      52    97   18\n",
      "289   男      6     150    95   86\n",
      "297   男      6      14   148   55\n",
      "('男', 7)\n",
      "    sex  class  Python  Math   En\n",
      "42    男      7      53   138   40\n",
      "44    男      7      46    74   57\n",
      "66    男      7      51    98   27\n",
      "136   男      7      47    63  128\n",
      "138   男      7      26     1    5\n",
      "145   男      7      82    57   84\n",
      "147   男      7      71    13   64\n",
      "154   男      7     147   109  100\n",
      "167   男      7     116     6   93\n",
      "168   男      7     141    86  126\n",
      "183   男      7      53    30  139\n",
      "204   男      7     141    50  138\n",
      "208   男      7     122    60  101\n",
      "220   男      7      35   139  124\n",
      "258   男      7     150   140  134\n",
      "286   男      7     115     1  137\n",
      "293   男      7      61    43   11\n",
      "295   男      7       1   141   82\n",
      "('男', 8)\n",
      "    sex  class  Python  Math   En\n",
      "1     男      8     122   141   67\n",
      "19    男      8      49   101  102\n",
      "20    男      8     128    32   72\n",
      "22    男      8     140   139   12\n",
      "86    男      8      25    70   13\n",
      "121   男      8     130   101  126\n",
      "131   男      8     123    64  133\n",
      "133   男      8      62   147   20\n",
      "135   男      8     142    34    3\n",
      "166   男      8      72    80   99\n",
      "172   男      8      97    72    0\n",
      "190   男      8     131   100   13\n",
      "205   男      8      65    22   55\n",
      "223   男      8      75    62  110\n",
      "229   男      8      62   137  100\n",
      "280   男      8      46    73  149\n",
      "287   男      8     107    25  129\n",
      "299   男      8      61    34   46\n"
     ]
    }
   ],
   "source": [
    "# 多分组\n",
    "for name ,group in df.groupby(by = ['sex','class']): # sex 2,class 8: 16组\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 345,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "g = df.groupby(by = 'sex')[['Math','En']] # 分组取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 354,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "m = {'sex':'category','class':'category','Python':'IT','Keras':'IT','Tensorflow':'IT','Java':'IT','C++':'IT'}\n",
    "for name,data in df.groupby(m,axis = 0):\n",
    "    print('组名',name)\n",
    "    print('数据',data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 346,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "    sex  class  Python  Math   En\n",
      "2     女      7     144     8   31\n",
      "3     女      1      58    78   94\n",
      "4     女      6      86    70   62\n",
      "5     女      2       3   101   40\n",
      "6     女      8      87    60  141\n",
      "..   ..    ...     ...   ...  ...\n",
      "282   女      6      32    86   72\n",
      "284   女      2      41    17   61\n",
      "288   女      6       9    82   87\n",
      "296   女      4      65   118  106\n",
      "298   女      5       7    46  132\n",
      "\n",
      "[139 rows x 5 columns]\n",
      "男\n",
      "    sex  class  Python  Math   En\n",
      "0     男      2      46    96  148\n",
      "1     男      8     122   141   67\n",
      "8     男      2      65    13  117\n",
      "12    男      5      50    46  134\n",
      "13    男      2      95    29  139\n",
      "..   ..    ...     ...   ...  ...\n",
      "293   男      7      61    43   11\n",
      "294   男      5      78    47  143\n",
      "295   男      7       1   141   82\n",
      "297   男      6      14   148   55\n",
      "299   男      8      61    34   46\n",
      "\n",
      "[161 rows x 5 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in g:\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 338,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)\n",
      "3       78\n",
      "26      22\n",
      "62     128\n",
      "71       6\n",
      "78     145\n",
      "80      27\n",
      "81      83\n",
      "89      46\n",
      "100    126\n",
      "113     15\n",
      "126      7\n",
      "130    133\n",
      "156    125\n",
      "197    118\n",
      "211     23\n",
      "231     90\n",
      "232    132\n",
      "250     38\n",
      "251      3\n",
      "256     82\n",
      "263    125\n",
      "Name: Math, dtype: int64\n",
      "('女', 2)\n",
      "5      101\n",
      "9      110\n",
      "11      88\n",
      "29      44\n",
      "67     122\n",
      "76     127\n",
      "90      84\n",
      "98      74\n",
      "112     35\n",
      "149    149\n",
      "165     29\n",
      "175    124\n",
      "178    101\n",
      "240     58\n",
      "241    122\n",
      "243    100\n",
      "262     68\n",
      "270    128\n",
      "278     19\n",
      "284     17\n",
      "Name: Math, dtype: int64\n",
      "('女', 3)\n",
      "7       66\n",
      "24      75\n",
      "39      68\n",
      "55       2\n",
      "61      39\n",
      "88      50\n",
      "101     72\n",
      "102     22\n",
      "122    121\n",
      "128     46\n",
      "150     86\n",
      "159    140\n",
      "160    127\n",
      "162    110\n",
      "163    127\n",
      "173    109\n",
      "207     58\n",
      "Name: Math, dtype: int64\n",
      "('女', 4)\n",
      "10      41\n",
      "15     133\n",
      "54      40\n",
      "57     106\n",
      "65      60\n",
      "74     131\n",
      "84     110\n",
      "93      64\n",
      "106    139\n",
      "115    107\n",
      "117     62\n",
      "186     49\n",
      "193    109\n",
      "199    143\n",
      "206     59\n",
      "226    125\n",
      "276     40\n",
      "296    118\n",
      "Name: Math, dtype: int64\n",
      "('女', 5)\n",
      "21      68\n",
      "82      98\n",
      "87      94\n",
      "107     19\n",
      "114     33\n",
      "141     49\n",
      "188     89\n",
      "194     47\n",
      "195      1\n",
      "228    100\n",
      "230    138\n",
      "234    140\n",
      "237     84\n",
      "255     61\n",
      "298     46\n",
      "Name: Math, dtype: int64\n",
      "('女', 6)\n",
      "4       70\n",
      "32     128\n",
      "33      30\n",
      "43     150\n",
      "77     104\n",
      "152     19\n",
      "181     83\n",
      "203    104\n",
      "210     58\n",
      "238    131\n",
      "260     48\n",
      "282     86\n",
      "288     82\n",
      "Name: Math, dtype: int64\n",
      "('女', 7)\n",
      "2        8\n",
      "16      12\n",
      "40     113\n",
      "59     142\n",
      "64     128\n",
      "96      68\n",
      "104     85\n",
      "105     73\n",
      "108    135\n",
      "151     12\n",
      "174    105\n",
      "192     68\n",
      "221     74\n",
      "225     52\n",
      "246     82\n",
      "257     49\n",
      "266    130\n",
      "267     99\n",
      "271     58\n",
      "Name: Math, dtype: int64\n",
      "('女', 8)\n",
      "6       60\n",
      "34      98\n",
      "46      31\n",
      "53     130\n",
      "56      88\n",
      "63      35\n",
      "70      34\n",
      "95      12\n",
      "103     42\n",
      "118    107\n",
      "144    144\n",
      "176     13\n",
      "196      6\n",
      "222    115\n",
      "252     29\n",
      "265    137\n",
      "Name: Math, dtype: int64\n",
      "('男', 1)\n",
      "69      24\n",
      "72      59\n",
      "85       9\n",
      "99      52\n",
      "110    136\n",
      "137     95\n",
      "142    142\n",
      "148    100\n",
      "153     40\n",
      "200     74\n",
      "209     74\n",
      "212     15\n",
      "213     43\n",
      "244     60\n",
      "259     28\n",
      "268     49\n",
      "269    129\n",
      "273     97\n",
      "281    149\n",
      "292    107\n",
      "Name: Math, dtype: int64\n",
      "('男', 2)\n",
      "0       96\n",
      "8       13\n",
      "13      29\n",
      "27      11\n",
      "31     149\n",
      "38     145\n",
      "49     133\n",
      "52      67\n",
      "58     122\n",
      "94     135\n",
      "109     78\n",
      "120     72\n",
      "123    148\n",
      "125    109\n",
      "146     53\n",
      "177    137\n",
      "189     49\n",
      "198     60\n",
      "217     64\n",
      "248    111\n",
      "249    104\n",
      "254     12\n",
      "264    148\n",
      "279     85\n",
      "Name: Math, dtype: int64\n",
      "('男', 3)\n",
      "25       6\n",
      "68      97\n",
      "79      39\n",
      "129     16\n",
      "134     20\n",
      "161    143\n",
      "169     60\n",
      "170    150\n",
      "180    106\n",
      "187     44\n",
      "218     14\n",
      "219      1\n",
      "224     27\n",
      "239      5\n",
      "242     44\n",
      "245    145\n",
      "272    143\n",
      "291    117\n",
      "Name: Math, dtype: int64\n",
      "('男', 4)\n",
      "14     113\n",
      "17      60\n",
      "18      32\n",
      "23      74\n",
      "36       8\n",
      "47       9\n",
      "75      92\n",
      "91       0\n",
      "92     118\n",
      "111     52\n",
      "116     46\n",
      "124    101\n",
      "140     63\n",
      "157     65\n",
      "179     61\n",
      "214    123\n",
      "227     86\n",
      "247     85\n",
      "261    114\n",
      "275     65\n",
      "283     29\n",
      "290    113\n",
      "Name: Math, dtype: int64\n",
      "('男', 5)\n",
      "12      46\n",
      "37     143\n",
      "41      64\n",
      "51      20\n",
      "60     132\n",
      "73      31\n",
      "155     63\n",
      "164     54\n",
      "171    122\n",
      "184     24\n",
      "201     80\n",
      "202     29\n",
      "216     96\n",
      "233     90\n",
      "277    111\n",
      "285     43\n",
      "294     47\n",
      "Name: Math, dtype: int64\n",
      "('男', 6)\n",
      "28      35\n",
      "30      88\n",
      "35       1\n",
      "45      35\n",
      "48      49\n",
      "50     134\n",
      "83       6\n",
      "97      40\n",
      "119     20\n",
      "127    145\n",
      "132    129\n",
      "139    104\n",
      "143      4\n",
      "158     66\n",
      "182    136\n",
      "185    117\n",
      "191     53\n",
      "215    140\n",
      "235    112\n",
      "236     44\n",
      "253    131\n",
      "274     97\n",
      "289     95\n",
      "297    148\n",
      "Name: Math, dtype: int64\n",
      "('男', 7)\n",
      "42     138\n",
      "44      74\n",
      "66      98\n",
      "136     63\n",
      "138      1\n",
      "145     57\n",
      "147     13\n",
      "154    109\n",
      "167      6\n",
      "168     86\n",
      "183     30\n",
      "204     50\n",
      "208     60\n",
      "220    139\n",
      "258    140\n",
      "286      1\n",
      "293     43\n",
      "295    141\n",
      "Name: Math, dtype: int64\n",
      "('男', 8)\n",
      "1      141\n",
      "19     101\n",
      "20      32\n",
      "22     139\n",
      "86      70\n",
      "121    101\n",
      "131     64\n",
      "133    147\n",
      "135     34\n",
      "166     80\n",
      "172     72\n",
      "190    100\n",
      "205     22\n",
      "223     62\n",
      "229    137\n",
      "280     73\n",
      "287     25\n",
      "299     34\n",
      "Name: Math, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "for name ,group in df['Math'].groupby([df['sex'],df['class']]):\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 340,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "     Math  Python\n",
      "2       8     144\n",
      "3      78      58\n",
      "4      70      86\n",
      "5     101       3\n",
      "6      60      87\n",
      "..    ...     ...\n",
      "282    86      32\n",
      "284    17      41\n",
      "288    82       9\n",
      "296   118      65\n",
      "298    46       7\n",
      "\n",
      "[139 rows x 2 columns]\n",
      "男\n",
      "     Math  Python\n",
      "0      96      46\n",
      "1     141     122\n",
      "8      13      65\n",
      "12     46      50\n",
      "13     29      95\n",
      "..    ...     ...\n",
      "293    43      61\n",
      "294    47      78\n",
      "295   141       1\n",
      "297   148      14\n",
      "299    34      61\n",
      "\n",
      "[161 rows x 2 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df[['Math','Python']].groupby(df['sex']):\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 356,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "int64\n",
      "     class  Python  Keras  Tensorflow  Java  C++\n",
      "0        5      25    103         121    25   51\n",
      "1        4      80     64         140   122   66\n",
      "2        3     136     63          64    97   30\n",
      "3        8     125     92          38    81  129\n",
      "4        2     107     99          78    48  117\n",
      "..     ...     ...    ...         ...   ...  ...\n",
      "295      4     105     79          84    51   86\n",
      "296      7      56     91          25    78   44\n",
      "297      8      43    109          10    71   78\n",
      "298      8     107    113         121     9   12\n",
      "299      5      36     25          46   102   36\n",
      "\n",
      "[300 rows x 6 columns]\n",
      "object\n",
      "    sex\n",
      "0     男\n",
      "1     男\n",
      "2     女\n",
      "3     女\n",
      "4     男\n",
      "..   ..\n",
      "295   女\n",
      "296   女\n",
      "297   女\n",
      "298   女\n",
      "299   男\n",
      "\n",
      "[300 rows x 1 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(df.dtypes,axis = 1):\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 358,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>女</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>104</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>女</td>\n",
       "      <td>4</td>\n",
       "      <td>30</td>\n",
       "      <td>106</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>男</td>\n",
       "      <td>4</td>\n",
       "      <td>138</td>\n",
       "      <td>126</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>女</td>\n",
       "      <td>1</td>\n",
       "      <td>26</td>\n",
       "      <td>98</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>男</td>\n",
       "      <td>2</td>\n",
       "      <td>54</td>\n",
       "      <td>86</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>男</td>\n",
       "      <td>4</td>\n",
       "      <td>105</td>\n",
       "      <td>27</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>女</td>\n",
       "      <td>6</td>\n",
       "      <td>137</td>\n",
       "      <td>115</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>男</td>\n",
       "      <td>5</td>\n",
       "      <td>131</td>\n",
       "      <td>124</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>女</td>\n",
       "      <td>8</td>\n",
       "      <td>64</td>\n",
       "      <td>80</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>男</td>\n",
       "      <td>1</td>\n",
       "      <td>62</td>\n",
       "      <td>142</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    sex  class  Python  Math   En\n",
       "0     女      7       0   104   82\n",
       "1     女      4      30   106   54\n",
       "2     男      4     138   126   88\n",
       "3     女      1      26    98   57\n",
       "4     男      2      54    86   60\n",
       "..   ..    ...     ...   ...  ...\n",
       "295   男      4     105    27  130\n",
       "296   女      6     137   115   59\n",
       "297   男      5     131   124   28\n",
       "298   女      8      64    80    0\n",
       "299   男      1      62   142   48\n",
       "\n",
       "[300 rows x 5 columns]"
      ]
     },
     "execution_count": 358,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'sex':np.random.randint(0,2,size = 300),\n",
    "                          'class':np.random.randint(1,9,size = 300),\n",
    "                          'Python':np.random.randint(0,151,size = 300),\n",
    "                          'Math':np.random.randint(0,151,size = 300),\n",
    "                          'En':np.random.randint(0,151,size = 300)})\n",
    "df['sex'] = df['sex'].map({0:'男',1:'女'})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 360,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "    sex  class  Python  Math  En\n",
      "0     女      7       0   104  82\n",
      "1     女      4      30   106  54\n",
      "3     女      1      26    98  57\n",
      "5     女      4      89     6  45\n",
      "6     女      3     142   115  61\n",
      "..   ..    ...     ...   ...  ..\n",
      "288   女      7     134    54   5\n",
      "291   女      4      33     0  42\n",
      "294   女      3      34   138  21\n",
      "296   女      6     137   115  59\n",
      "298   女      8      64    80   0\n",
      "\n",
      "[168 rows x 5 columns]\n",
      "男\n",
      "    sex  class  Python  Math   En\n",
      "2     男      4     138   126   88\n",
      "4     男      2      54    86   60\n",
      "7     男      5     135   141    5\n",
      "8     男      3      90    99   83\n",
      "10    男      7       5   139  105\n",
      "..   ..    ...     ...   ...  ...\n",
      "292   男      5     135     1   31\n",
      "293   男      2      34    92  150\n",
      "295   男      4     105    27  130\n",
      "297   男      5     131   124   28\n",
      "299   男      1      62   142   48\n",
      "\n",
      "[132 rows x 5 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(by = 'sex'): # 单分组\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 361,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)\n",
      "    sex  class  Python  Math   En\n",
      "3     女      1      26    98   57\n",
      "16    女      1     144    79  143\n",
      "27    女      1      18    98  104\n",
      "48    女      1     111   140   54\n",
      "55    女      1      59    43    6\n",
      "61    女      1     109   132    2\n",
      "74    女      1      71    62   35\n",
      "93    女      1      80   131   41\n",
      "157   女      1      96    11  130\n",
      "168   女      1      76    23  137\n",
      "188   女      1      80    16  100\n",
      "203   女      1      48   137  102\n",
      "207   女      1      11    78   42\n",
      "236   女      1       2   119  148\n",
      "275   女      1      56   109   22\n",
      "278   女      1      93    22   45\n",
      "287   女      1     115   115  118\n",
      "('女', 2)\n",
      "    sex  class  Python  Math   En\n",
      "14    女      2     129   142  116\n",
      "20    女      2      20    64  139\n",
      "50    女      2     135    77   58\n",
      "53    女      2     129    50   84\n",
      "70    女      2      58   145  123\n",
      "73    女      2     142    48  136\n",
      "103   女      2     129    39  107\n",
      "124   女      2     118   112  103\n",
      "126   女      2      10    72   57\n",
      "135   女      2     112   137   38\n",
      "139   女      2      74    22  118\n",
      "159   女      2      95    79   40\n",
      "171   女      2      94    43   30\n",
      "175   女      2     110     1    4\n",
      "184   女      2      68    20   76\n",
      "204   女      2     117   121    0\n",
      "257   女      2      18   127  135\n",
      "277   女      2      35    90   96\n",
      "282   女      2       0   132  119\n",
      "285   女      2     132    11  146\n",
      "286   女      2     103    21  122\n",
      "('女', 3)\n",
      "    sex  class  Python  Math   En\n",
      "6     女      3     142   115   61\n",
      "18    女      3      54    70   71\n",
      "51    女      3       4    20  105\n",
      "65    女      3      63    48   11\n",
      "71    女      3     137   150   83\n",
      "88    女      3       3   114    9\n",
      "106   女      3      17   108   35\n",
      "116   女      3      46    70    3\n",
      "127   女      3     104    92   18\n",
      "130   女      3      27   138   76\n",
      "166   女      3      48    81   61\n",
      "208   女      3     146    39  135\n",
      "219   女      3     142    91   20\n",
      "237   女      3     112   105  137\n",
      "239   女      3      74   129   63\n",
      "243   女      3     147    52  104\n",
      "248   女      3      61   124  122\n",
      "266   女      3      92   110   31\n",
      "276   女      3      51    75   26\n",
      "280   女      3      25   103  118\n",
      "283   女      3       0    37   54\n",
      "294   女      3      34   138   21\n",
      "('女', 4)\n",
      "    sex  class  Python  Math   En\n",
      "1     女      4      30   106   54\n",
      "5     女      4      89     6   45\n",
      "24    女      4     140    95   56\n",
      "28    女      4      47    66  136\n",
      "39    女      4      48     7   67\n",
      "45    女      4      91    60   33\n",
      "49    女      4     130    34   43\n",
      "69    女      4     131    92  108\n",
      "72    女      4      34    86   86\n",
      "84    女      4      78    51   52\n",
      "89    女      4     114    61   40\n",
      "95    女      4      67    35  104\n",
      "96    女      4     118    91   14\n",
      "105   女      4       6     2   44\n",
      "118   女      4     138    19   42\n",
      "129   女      4      94    76   96\n",
      "141   女      4       8    48    2\n",
      "191   女      4      77    14  127\n",
      "192   女      4     113    18    8\n",
      "198   女      4     106    18  103\n",
      "199   女      4      16    27   96\n",
      "252   女      4      51    53   88\n",
      "258   女      4      79    12  150\n",
      "291   女      4      33     0   42\n",
      "('女', 5)\n",
      "    sex  class  Python  Math   En\n",
      "9     女      5      65   100   37\n",
      "12    女      5     143   134   53\n",
      "17    女      5     128   108  103\n",
      "25    女      5     100    59   73\n",
      "29    女      5      10    44  123\n",
      "67    女      5      61    15  122\n",
      "80    女      5      79    74  100\n",
      "86    女      5      95    69   75\n",
      "108   女      5       9   108    3\n",
      "115   女      5      64   124   73\n",
      "132   女      5     122    46   59\n",
      "150   女      5      84    77    6\n",
      "154   女      5     110     4   33\n",
      "160   女      5     127    55    1\n",
      "162   女      5      37    77  120\n",
      "164   女      5     137   125   66\n",
      "176   女      5      62    57  116\n",
      "177   女      5      33   123  105\n",
      "190   女      5     146   123   24\n",
      "213   女      5      52    23  110\n",
      "224   女      5      93    52  123\n",
      "238   女      5      26    15  112\n",
      "253   女      5       1    37   78\n",
      "('女', 6)\n",
      "    sex  class  Python  Math   En\n",
      "13    女      6      97    92   72\n",
      "23    女      6      44    22  115\n",
      "30    女      6      13   133   53\n",
      "38    女      6      37    73  140\n",
      "43    女      6     109   111   99\n",
      "44    女      6     126   112  149\n",
      "47    女      6      19   118   88\n",
      "58    女      6      70   139   29\n",
      "76    女      6      38    21  138\n",
      "121   女      6     119    45  145\n",
      "147   女      6      69    71  106\n",
      "185   女      6      91    84   39\n",
      "215   女      6      83   106  121\n",
      "242   女      6     117     9  113\n",
      "251   女      6     109    49   42\n",
      "255   女      6     110   136   56\n",
      "270   女      6      65    94  125\n",
      "271   女      6     125   139   38\n",
      "296   女      6     137   115   59\n",
      "('女', 7)\n",
      "    sex  class  Python  Math   En\n",
      "0     女      7       0   104   82\n",
      "22    女      7     100   131  113\n",
      "37    女      7     145    85  116\n",
      "54    女      7      39   116  106\n",
      "57    女      7      87   124   25\n",
      "81    女      7       1    73  130\n",
      "83    女      7      66    93   54\n",
      "99    女      7      46    12   81\n",
      "102   女      7      69    26   86\n",
      "110   女      7      51    63   28\n",
      "117   女      7      87    50   91\n",
      "123   女      7      40    85  115\n",
      "131   女      7       5    40  144\n",
      "134   女      7      48    81  140\n",
      "155   女      7      71     0   20\n",
      "158   女      7      91   120   24\n",
      "174   女      7     117    95    6\n",
      "196   女      7      45    27  141\n",
      "202   女      7      20   110   37\n",
      "209   女      7     126    80    9\n",
      "216   女      7      13    59   17\n",
      "218   女      7      15    15   23\n",
      "221   女      7      27    14   85\n",
      "233   女      7     123    17   49\n",
      "274   女      7      71   118   20\n",
      "288   女      7     134    54    5\n",
      "('女', 8)\n",
      "    sex  class  Python  Math   En\n",
      "34    女      8     119   110  132\n",
      "52    女      8      26    44   92\n",
      "66    女      8     147    26  130\n",
      "68    女      8      55   150   19\n",
      "82    女      8      79    48   18\n",
      "92    女      8      39    56   33\n",
      "119   女      8     146    85  115\n",
      "149   女      8      53    79   25\n",
      "163   女      8     130    83   22\n",
      "182   女      8      94   146  143\n",
      "230   女      8      27   122   23\n",
      "244   女      8      11     7   81\n",
      "247   女      8      51    21   45\n",
      "250   女      8     133    76   69\n",
      "259   女      8      37    73  108\n",
      "298   女      8      64    80    0\n",
      "('男', 1)\n",
      "    sex  class  Python  Math   En\n",
      "33    男      1     107    80   17\n",
      "62    男      1      70    33   35\n",
      "78    男      1      95    54   82\n",
      "94    男      1      65    32  119\n",
      "125   男      1     138   100  112\n",
      "128   男      1       2    56  102\n",
      "137   男      1      27    84  117\n",
      "143   男      1      61    74  150\n",
      "148   男      1      74    28  129\n",
      "167   男      1      47    47  132\n",
      "210   男      1      70    75   88\n",
      "212   男      1     124    96  130\n",
      "226   男      1       1    64   64\n",
      "249   男      1      77   150  128\n",
      "267   男      1      39    97  140\n",
      "279   男      1     136   143    3\n",
      "281   男      1      82    69   55\n",
      "299   男      1      62   142   48\n",
      "('男', 2)\n",
      "    sex  class  Python  Math   En\n",
      "4     男      2      54    86   60\n",
      "41    男      2      96   145  110\n",
      "42    男      2      93    51   89\n",
      "109   男      2     138    96    3\n",
      "142   男      2      11   105  109\n",
      "172   男      2      21   124    6\n",
      "195   男      2     125    50  142\n",
      "231   男      2      65    47   85\n",
      "234   男      2     130     8   65\n",
      "235   男      2     113   120   19\n",
      "240   男      2     124     5  101\n",
      "241   男      2     134    47   18\n",
      "246   男      2      49    37   49\n",
      "265   男      2      86    30   43\n",
      "269   男      2     141     7  131\n",
      "272   男      2     101   121   84\n",
      "273   男      2     117    64   97\n",
      "293   男      2      34    92  150\n",
      "('男', 3)\n",
      "    sex  class  Python  Math   En\n",
      "8     男      3      90    99   83\n",
      "32    男      3     127   115   98\n",
      "60    男      3     102    80  147\n",
      "97    男      3     131    69   44\n",
      "98    男      3     123   108    4\n",
      "100   男      3     146    89   12\n",
      "101   男      3      27    33   94\n",
      "144   男      3     139   126  130\n",
      "153   男      3     140    37   40\n",
      "178   男      3     103    72  103\n",
      "186   男      3     141    34  142\n",
      "201   男      3     125     8  142\n",
      "211   男      3     101   137    5\n",
      "222   男      3     106    54   17\n",
      "245   男      3     136    84    8\n",
      "256   男      3      79    60   53\n",
      "264   男      3     113   128   22\n",
      "('男', 4)\n",
      "    sex  class  Python  Math   En\n",
      "2     男      4     138   126   88\n",
      "11    男      4     150    35   75\n",
      "21    男      4      24    50   69\n",
      "75    男      4      98    85   10\n",
      "87    男      4     140     8  104\n",
      "90    男      4      21    15   65\n",
      "112   男      4      98    16  140\n",
      "140   男      4      48    55  103\n",
      "193   男      4      91   104   13\n",
      "197   男      4      24   121   44\n",
      "200   男      4      62   123    1\n",
      "223   男      4     133   109   12\n",
      "227   男      4      65    19   13\n",
      "254   男      4      69   100  141\n",
      "261   男      4      53   114   11\n",
      "262   男      4      81    57    6\n",
      "268   男      4      36    13   59\n",
      "284   男      4     112    81   21\n",
      "290   男      4      49   102  103\n",
      "295   男      4     105    27  130\n",
      "('男', 5)\n",
      "    sex  class  Python  Math   En\n",
      "7     男      5     135   141    5\n",
      "26    男      5       8    27   88\n",
      "35    男      5     125   114   17\n",
      "40    男      5      75     5   87\n",
      "59    男      5     124   144   72\n",
      "63    男      5      51   100   73\n",
      "107   男      5      10    22   45\n",
      "120   男      5     103    70   32\n",
      "151   男      5      44    99   58\n",
      "152   男      5     120    73   58\n",
      "165   男      5      14    59   39\n",
      "179   男      5      73    79  103\n",
      "187   男      5     117    85  106\n",
      "217   男      5      63    52   76\n",
      "228   男      5      40     5   76\n",
      "263   男      5      71    60   69\n",
      "289   男      5     118   127   40\n",
      "292   男      5     135     1   31\n",
      "297   男      5     131   124   28\n",
      "('男', 6)\n",
      "    sex  class  Python  Math   En\n",
      "31    男      6      59    55   99\n",
      "79    男      6      68   136  132\n",
      "133   男      6      94    25  139\n",
      "173   男      6     138   148    5\n",
      "180   男      6      28    79   78\n",
      "183   男      6     133    27   52\n",
      "205   男      6      63    52   77\n",
      "220   男      6      62   122   35\n",
      "('男', 7)\n",
      "    sex  class  Python  Math   En\n",
      "10    男      7       5   139  105\n",
      "15    男      7      89    90  102\n",
      "19    男      7      83    36   80\n",
      "36    男      7     106    33  142\n",
      "46    男      7      27    55  103\n",
      "56    男      7      53   141  147\n",
      "77    男      7      80   130   78\n",
      "85    男      7     105    71   53\n",
      "91    男      7      92    66  116\n",
      "104   男      7      29    68   52\n",
      "113   男      7      83    28  138\n",
      "122   男      7      84    61   56\n",
      "138   男      7     136    50   56\n",
      "145   男      7      45    40   38\n",
      "181   男      7      51    71   80\n",
      "194   男      7      31    65  149\n",
      "229   男      7      51   103  114\n",
      "('男', 8)\n",
      "    sex  class  Python  Math   En\n",
      "64    男      8     104    10    3\n",
      "111   男      8     122   128  112\n",
      "114   男      8      32     6   32\n",
      "136   男      8      13    16    9\n",
      "146   男      8      43   138  112\n",
      "156   男      8      85    11  133\n",
      "161   男      8      68   146   54\n",
      "169   男      8     138    76    0\n",
      "170   男      8      28    96   71\n",
      "189   男      8      78   112   16\n",
      "206   男      8     133    36   70\n",
      "214   男      8      36   115   62\n",
      "225   男      8      80    30   98\n",
      "232   男      8      63    89   97\n",
      "260   男      8     124   110   15\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(by = ['sex','class']): # 多分组，性别2，class 8 = 16\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 364,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女      Python  Math\n",
      "0         0   104\n",
      "1        30   106\n",
      "3        26    98\n",
      "5        89     6\n",
      "6       142   115\n",
      "..      ...   ...\n",
      "288     134    54\n",
      "291      33     0\n",
      "294      34   138\n",
      "296     137   115\n",
      "298      64    80\n",
      "\n",
      "[168 rows x 2 columns]\n",
      "男      Python  Math\n",
      "2       138   126\n",
      "4        54    86\n",
      "7       135   141\n",
      "8        90    99\n",
      "10        5   139\n",
      "..      ...   ...\n",
      "292     135     1\n",
      "293      34    92\n",
      "295     105    27\n",
      "297     131   124\n",
      "299      62   142\n",
      "\n",
      "[132 rows x 2 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df[['Python','Math']].groupby(df['sex']):\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 365,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)      Python  Math\n",
      "3        26    98\n",
      "16      144    79\n",
      "27       18    98\n",
      "48      111   140\n",
      "55       59    43\n",
      "61      109   132\n",
      "74       71    62\n",
      "93       80   131\n",
      "157      96    11\n",
      "168      76    23\n",
      "188      80    16\n",
      "203      48   137\n",
      "207      11    78\n",
      "236       2   119\n",
      "275      56   109\n",
      "278      93    22\n",
      "287     115   115\n",
      "('女', 2)      Python  Math\n",
      "14      129   142\n",
      "20       20    64\n",
      "50      135    77\n",
      "53      129    50\n",
      "70       58   145\n",
      "73      142    48\n",
      "103     129    39\n",
      "124     118   112\n",
      "126      10    72\n",
      "135     112   137\n",
      "139      74    22\n",
      "159      95    79\n",
      "171      94    43\n",
      "175     110     1\n",
      "184      68    20\n",
      "204     117   121\n",
      "257      18   127\n",
      "277      35    90\n",
      "282       0   132\n",
      "285     132    11\n",
      "286     103    21\n",
      "('女', 3)      Python  Math\n",
      "6       142   115\n",
      "18       54    70\n",
      "51        4    20\n",
      "65       63    48\n",
      "71      137   150\n",
      "88        3   114\n",
      "106      17   108\n",
      "116      46    70\n",
      "127     104    92\n",
      "130      27   138\n",
      "166      48    81\n",
      "208     146    39\n",
      "219     142    91\n",
      "237     112   105\n",
      "239      74   129\n",
      "243     147    52\n",
      "248      61   124\n",
      "266      92   110\n",
      "276      51    75\n",
      "280      25   103\n",
      "283       0    37\n",
      "294      34   138\n",
      "('女', 4)      Python  Math\n",
      "1        30   106\n",
      "5        89     6\n",
      "24      140    95\n",
      "28       47    66\n",
      "39       48     7\n",
      "45       91    60\n",
      "49      130    34\n",
      "69      131    92\n",
      "72       34    86\n",
      "84       78    51\n",
      "89      114    61\n",
      "95       67    35\n",
      "96      118    91\n",
      "105       6     2\n",
      "118     138    19\n",
      "129      94    76\n",
      "141       8    48\n",
      "191      77    14\n",
      "192     113    18\n",
      "198     106    18\n",
      "199      16    27\n",
      "252      51    53\n",
      "258      79    12\n",
      "291      33     0\n",
      "('女', 5)      Python  Math\n",
      "9        65   100\n",
      "12      143   134\n",
      "17      128   108\n",
      "25      100    59\n",
      "29       10    44\n",
      "67       61    15\n",
      "80       79    74\n",
      "86       95    69\n",
      "108       9   108\n",
      "115      64   124\n",
      "132     122    46\n",
      "150      84    77\n",
      "154     110     4\n",
      "160     127    55\n",
      "162      37    77\n",
      "164     137   125\n",
      "176      62    57\n",
      "177      33   123\n",
      "190     146   123\n",
      "213      52    23\n",
      "224      93    52\n",
      "238      26    15\n",
      "253       1    37\n",
      "('女', 6)      Python  Math\n",
      "13       97    92\n",
      "23       44    22\n",
      "30       13   133\n",
      "38       37    73\n",
      "43      109   111\n",
      "44      126   112\n",
      "47       19   118\n",
      "58       70   139\n",
      "76       38    21\n",
      "121     119    45\n",
      "147      69    71\n",
      "185      91    84\n",
      "215      83   106\n",
      "242     117     9\n",
      "251     109    49\n",
      "255     110   136\n",
      "270      65    94\n",
      "271     125   139\n",
      "296     137   115\n",
      "('女', 7)      Python  Math\n",
      "0         0   104\n",
      "22      100   131\n",
      "37      145    85\n",
      "54       39   116\n",
      "57       87   124\n",
      "81        1    73\n",
      "83       66    93\n",
      "99       46    12\n",
      "102      69    26\n",
      "110      51    63\n",
      "117      87    50\n",
      "123      40    85\n",
      "131       5    40\n",
      "134      48    81\n",
      "155      71     0\n",
      "158      91   120\n",
      "174     117    95\n",
      "196      45    27\n",
      "202      20   110\n",
      "209     126    80\n",
      "216      13    59\n",
      "218      15    15\n",
      "221      27    14\n",
      "233     123    17\n",
      "274      71   118\n",
      "288     134    54\n",
      "('女', 8)      Python  Math\n",
      "34      119   110\n",
      "52       26    44\n",
      "66      147    26\n",
      "68       55   150\n",
      "82       79    48\n",
      "92       39    56\n",
      "119     146    85\n",
      "149      53    79\n",
      "163     130    83\n",
      "182      94   146\n",
      "230      27   122\n",
      "244      11     7\n",
      "247      51    21\n",
      "250     133    76\n",
      "259      37    73\n",
      "298      64    80\n",
      "('男', 1)      Python  Math\n",
      "33      107    80\n",
      "62       70    33\n",
      "78       95    54\n",
      "94       65    32\n",
      "125     138   100\n",
      "128       2    56\n",
      "137      27    84\n",
      "143      61    74\n",
      "148      74    28\n",
      "167      47    47\n",
      "210      70    75\n",
      "212     124    96\n",
      "226       1    64\n",
      "249      77   150\n",
      "267      39    97\n",
      "279     136   143\n",
      "281      82    69\n",
      "299      62   142\n",
      "('男', 2)      Python  Math\n",
      "4        54    86\n",
      "41       96   145\n",
      "42       93    51\n",
      "109     138    96\n",
      "142      11   105\n",
      "172      21   124\n",
      "195     125    50\n",
      "231      65    47\n",
      "234     130     8\n",
      "235     113   120\n",
      "240     124     5\n",
      "241     134    47\n",
      "246      49    37\n",
      "265      86    30\n",
      "269     141     7\n",
      "272     101   121\n",
      "273     117    64\n",
      "293      34    92\n",
      "('男', 3)      Python  Math\n",
      "8        90    99\n",
      "32      127   115\n",
      "60      102    80\n",
      "97      131    69\n",
      "98      123   108\n",
      "100     146    89\n",
      "101      27    33\n",
      "144     139   126\n",
      "153     140    37\n",
      "178     103    72\n",
      "186     141    34\n",
      "201     125     8\n",
      "211     101   137\n",
      "222     106    54\n",
      "245     136    84\n",
      "256      79    60\n",
      "264     113   128\n",
      "('男', 4)      Python  Math\n",
      "2       138   126\n",
      "11      150    35\n",
      "21       24    50\n",
      "75       98    85\n",
      "87      140     8\n",
      "90       21    15\n",
      "112      98    16\n",
      "140      48    55\n",
      "193      91   104\n",
      "197      24   121\n",
      "200      62   123\n",
      "223     133   109\n",
      "227      65    19\n",
      "254      69   100\n",
      "261      53   114\n",
      "262      81    57\n",
      "268      36    13\n",
      "284     112    81\n",
      "290      49   102\n",
      "295     105    27\n",
      "('男', 5)      Python  Math\n",
      "7       135   141\n",
      "26        8    27\n",
      "35      125   114\n",
      "40       75     5\n",
      "59      124   144\n",
      "63       51   100\n",
      "107      10    22\n",
      "120     103    70\n",
      "151      44    99\n",
      "152     120    73\n",
      "165      14    59\n",
      "179      73    79\n",
      "187     117    85\n",
      "217      63    52\n",
      "228      40     5\n",
      "263      71    60\n",
      "289     118   127\n",
      "292     135     1\n",
      "297     131   124\n",
      "('男', 6)      Python  Math\n",
      "31       59    55\n",
      "79       68   136\n",
      "133      94    25\n",
      "173     138   148\n",
      "180      28    79\n",
      "183     133    27\n",
      "205      63    52\n",
      "220      62   122\n",
      "('男', 7)      Python  Math\n",
      "10        5   139\n",
      "15       89    90\n",
      "19       83    36\n",
      "36      106    33\n",
      "46       27    55\n",
      "56       53   141\n",
      "77       80   130\n",
      "85      105    71\n",
      "91       92    66\n",
      "104      29    68\n",
      "113      83    28\n",
      "122      84    61\n",
      "138     136    50\n",
      "145      45    40\n",
      "181      51    71\n",
      "194      31    65\n",
      "229      51   103\n",
      "('男', 8)      Python  Math\n",
      "64      104    10\n",
      "111     122   128\n",
      "114      32     6\n",
      "136      13    16\n",
      "146      43   138\n",
      "156      85    11\n",
      "161      68   146\n",
      "169     138    76\n",
      "170      28    96\n",
      "189      78   112\n",
      "206     133    36\n",
      "214      36   115\n",
      "225      80    30\n",
      "232      63    89\n",
      "260     124   110\n"
     ]
    }
   ],
   "source": [
    "for name,group in df[['Python','Math']].groupby([df['sex'],df['class']]):\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 368,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "int64      class  Python  Math   En\n",
      "0        7       0   104   82\n",
      "1        4      30   106   54\n",
      "2        4     138   126   88\n",
      "3        1      26    98   57\n",
      "4        2      54    86   60\n",
      "..     ...     ...   ...  ...\n",
      "295      4     105    27  130\n",
      "296      6     137   115   59\n",
      "297      5     131   124   28\n",
      "298      8      64    80    0\n",
      "299      1      62   142   48\n",
      "\n",
      "[300 rows x 4 columns]\n",
      "object     sex\n",
      "0     女\n",
      "1     女\n",
      "2     男\n",
      "3     女\n",
      "4     男\n",
      "..   ..\n",
      "295   男\n",
      "296   女\n",
      "297   男\n",
      "298   女\n",
      "299   男\n",
      "\n",
      "[300 rows x 1 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(df.dtypes,axis = 1): #根据数据类型进行分组\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 369,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "category     sex  class\n",
      "0     女      7\n",
      "1     女      4\n",
      "2     男      4\n",
      "3     女      1\n",
      "4     男      2\n",
      "..   ..    ...\n",
      "295   男      4\n",
      "296   女      6\n",
      "297   男      5\n",
      "298   女      8\n",
      "299   男      1\n",
      "\n",
      "[300 rows x 2 columns]\n",
      "科目      Python  Math   En\n",
      "0         0   104   82\n",
      "1        30   106   54\n",
      "2       138   126   88\n",
      "3        26    98   57\n",
      "4        54    86   60\n",
      "..      ...   ...  ...\n",
      "295     105    27  130\n",
      "296     137   115   59\n",
      "297     131   124   28\n",
      "298      64    80    0\n",
      "299      62   142   48\n",
      "\n",
      "[300 rows x 3 columns]\n"
     ]
    }
   ],
   "source": [
    "m = {'sex':'category','class':'category','Python':'科目','Math':'科目','En':'科目'}\n",
    "for name,group in df.groupby(by = m,axis = 1):\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组聚合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 371,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>女</th>\n",
       "      <td>147</td>\n",
       "      <td>150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>男</th>\n",
       "      <td>150</td>\n",
       "      <td>150</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Python  Math\n",
       "sex              \n",
       "女       147   150\n",
       "男       150   150"
      ]
     },
     "execution_count": 371,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = 'sex')[['Python','Math']].max() # 数学Python根据性别分组，求解的最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 372,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>70.3</td>\n",
       "      <td>83.1</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>87.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>88.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>69.5</td>\n",
       "      <td>91.3</td>\n",
       "      <td>62.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>76.6</td>\n",
       "      <td>44.9</td>\n",
       "      <td>68.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>77.6</td>\n",
       "      <td>71.7</td>\n",
       "      <td>74.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>83.1</td>\n",
       "      <td>87.8</td>\n",
       "      <td>90.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>63.0</td>\n",
       "      <td>68.9</td>\n",
       "      <td>67.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>75.7</td>\n",
       "      <td>75.4</td>\n",
       "      <td>65.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>70.9</td>\n",
       "      <td>79.1</td>\n",
       "      <td>91.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>90.7</td>\n",
       "      <td>68.6</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113.5</td>\n",
       "      <td>78.4</td>\n",
       "      <td>67.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>79.8</td>\n",
       "      <td>68.0</td>\n",
       "      <td>60.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>81.9</td>\n",
       "      <td>73.0</td>\n",
       "      <td>58.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.6</td>\n",
       "      <td>80.5</td>\n",
       "      <td>77.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>67.6</td>\n",
       "      <td>73.4</td>\n",
       "      <td>94.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.5</td>\n",
       "      <td>74.6</td>\n",
       "      <td>58.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Python  Math    En\n",
       "sex class                    \n",
       "女   1        70.3  83.1  75.6\n",
       "    2        87.0  74.0  88.0\n",
       "    3        69.5  91.3  62.0\n",
       "    4        76.6  44.9  68.2\n",
       "    5        77.6  71.7  74.6\n",
       "    6        83.1  87.8  90.9\n",
       "    7        63.0  68.9  67.2\n",
       "    8        75.7  75.4  65.9\n",
       "男   1        70.9  79.1  91.7\n",
       "    2        90.7  68.6  75.6\n",
       "    3       113.5  78.4  67.3\n",
       "    4        79.8  68.0  60.4\n",
       "    5        81.9  73.0  58.1\n",
       "    6        80.6  80.5  77.1\n",
       "    7        67.6  73.4  94.6\n",
       "    8        76.5  74.6  58.9"
      ]
     },
     "execution_count": 372,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).mean().round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 373,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "sex  class\n",
       "女    1        17\n",
       "     2        21\n",
       "     3        22\n",
       "     4        24\n",
       "     5        23\n",
       "     6        19\n",
       "     7        26\n",
       "     8        16\n",
       "男    1        18\n",
       "     2        18\n",
       "     3        17\n",
       "     4        20\n",
       "     5        19\n",
       "     6         8\n",
       "     7        17\n",
       "     8        15\n",
       "dtype: int64"
      ]
     },
     "execution_count": 373,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).size() # 统计各个班级男女人数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 375,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"8\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"5\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"8\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>...</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>17.0</td>\n",
       "      <td>70.3</td>\n",
       "      <td>40.1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>48.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>96.0</td>\n",
       "      <td>144.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>83.1</td>\n",
       "      <td>...</td>\n",
       "      <td>119.0</td>\n",
       "      <td>140.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>75.6</td>\n",
       "      <td>49.5</td>\n",
       "      <td>2.0</td>\n",
       "      <td>41.0</td>\n",
       "      <td>57.0</td>\n",
       "      <td>118.0</td>\n",
       "      <td>148.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>21.0</td>\n",
       "      <td>87.0</td>\n",
       "      <td>46.3</td>\n",
       "      <td>0.0</td>\n",
       "      <td>58.0</td>\n",
       "      <td>103.0</td>\n",
       "      <td>129.0</td>\n",
       "      <td>142.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>...</td>\n",
       "      <td>121.0</td>\n",
       "      <td>145.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>88.0</td>\n",
       "      <td>45.4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>57.0</td>\n",
       "      <td>103.0</td>\n",
       "      <td>122.0</td>\n",
       "      <td>146.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>22.0</td>\n",
       "      <td>69.5</td>\n",
       "      <td>50.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>28.8</td>\n",
       "      <td>57.5</td>\n",
       "      <td>110.0</td>\n",
       "      <td>147.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>91.3</td>\n",
       "      <td>...</td>\n",
       "      <td>114.8</td>\n",
       "      <td>150.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>43.3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>22.2</td>\n",
       "      <td>61.0</td>\n",
       "      <td>98.8</td>\n",
       "      <td>137.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>24.0</td>\n",
       "      <td>76.6</td>\n",
       "      <td>42.4</td>\n",
       "      <td>6.0</td>\n",
       "      <td>43.8</td>\n",
       "      <td>78.5</td>\n",
       "      <td>113.2</td>\n",
       "      <td>140.0</td>\n",
       "      <td>24.0</td>\n",
       "      <td>44.9</td>\n",
       "      <td>...</td>\n",
       "      <td>68.5</td>\n",
       "      <td>106.0</td>\n",
       "      <td>24.0</td>\n",
       "      <td>68.2</td>\n",
       "      <td>40.5</td>\n",
       "      <td>2.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>55.0</td>\n",
       "      <td>97.8</td>\n",
       "      <td>150.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>23.0</td>\n",
       "      <td>77.6</td>\n",
       "      <td>45.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>44.5</td>\n",
       "      <td>79.0</td>\n",
       "      <td>116.0</td>\n",
       "      <td>146.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>71.7</td>\n",
       "      <td>...</td>\n",
       "      <td>108.0</td>\n",
       "      <td>134.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>74.6</td>\n",
       "      <td>41.3</td>\n",
       "      <td>1.0</td>\n",
       "      <td>45.0</td>\n",
       "      <td>75.0</td>\n",
       "      <td>111.0</td>\n",
       "      <td>123.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>19.0</td>\n",
       "      <td>83.1</td>\n",
       "      <td>38.5</td>\n",
       "      <td>13.0</td>\n",
       "      <td>54.5</td>\n",
       "      <td>91.0</td>\n",
       "      <td>113.5</td>\n",
       "      <td>137.0</td>\n",
       "      <td>19.0</td>\n",
       "      <td>87.8</td>\n",
       "      <td>...</td>\n",
       "      <td>116.5</td>\n",
       "      <td>139.0</td>\n",
       "      <td>19.0</td>\n",
       "      <td>90.9</td>\n",
       "      <td>40.9</td>\n",
       "      <td>29.0</td>\n",
       "      <td>54.5</td>\n",
       "      <td>99.0</td>\n",
       "      <td>123.0</td>\n",
       "      <td>149.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>26.0</td>\n",
       "      <td>63.0</td>\n",
       "      <td>43.3</td>\n",
       "      <td>0.0</td>\n",
       "      <td>30.0</td>\n",
       "      <td>58.5</td>\n",
       "      <td>90.0</td>\n",
       "      <td>145.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>68.9</td>\n",
       "      <td>...</td>\n",
       "      <td>101.8</td>\n",
       "      <td>131.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>67.2</td>\n",
       "      <td>47.8</td>\n",
       "      <td>5.0</td>\n",
       "      <td>23.2</td>\n",
       "      <td>67.5</td>\n",
       "      <td>111.2</td>\n",
       "      <td>144.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>16.0</td>\n",
       "      <td>75.7</td>\n",
       "      <td>46.2</td>\n",
       "      <td>11.0</td>\n",
       "      <td>38.5</td>\n",
       "      <td>59.5</td>\n",
       "      <td>121.8</td>\n",
       "      <td>147.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>75.4</td>\n",
       "      <td>...</td>\n",
       "      <td>91.2</td>\n",
       "      <td>150.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>65.9</td>\n",
       "      <td>48.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>22.8</td>\n",
       "      <td>57.0</td>\n",
       "      <td>109.8</td>\n",
       "      <td>143.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>18.0</td>\n",
       "      <td>70.9</td>\n",
       "      <td>39.8</td>\n",
       "      <td>1.0</td>\n",
       "      <td>50.5</td>\n",
       "      <td>70.0</td>\n",
       "      <td>91.8</td>\n",
       "      <td>138.0</td>\n",
       "      <td>18.0</td>\n",
       "      <td>79.1</td>\n",
       "      <td>...</td>\n",
       "      <td>96.8</td>\n",
       "      <td>150.0</td>\n",
       "      <td>18.0</td>\n",
       "      <td>91.7</td>\n",
       "      <td>44.9</td>\n",
       "      <td>3.0</td>\n",
       "      <td>57.2</td>\n",
       "      <td>107.0</td>\n",
       "      <td>128.8</td>\n",
       "      <td>150.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>18.0</td>\n",
       "      <td>90.7</td>\n",
       "      <td>42.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>56.8</td>\n",
       "      <td>98.5</td>\n",
       "      <td>124.8</td>\n",
       "      <td>141.0</td>\n",
       "      <td>18.0</td>\n",
       "      <td>68.6</td>\n",
       "      <td>...</td>\n",
       "      <td>102.8</td>\n",
       "      <td>145.0</td>\n",
       "      <td>18.0</td>\n",
       "      <td>75.6</td>\n",
       "      <td>45.7</td>\n",
       "      <td>3.0</td>\n",
       "      <td>44.5</td>\n",
       "      <td>84.5</td>\n",
       "      <td>107.0</td>\n",
       "      <td>150.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>17.0</td>\n",
       "      <td>113.5</td>\n",
       "      <td>29.6</td>\n",
       "      <td>27.0</td>\n",
       "      <td>102.0</td>\n",
       "      <td>123.0</td>\n",
       "      <td>136.0</td>\n",
       "      <td>146.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>78.4</td>\n",
       "      <td>...</td>\n",
       "      <td>108.0</td>\n",
       "      <td>137.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>67.3</td>\n",
       "      <td>53.1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>53.0</td>\n",
       "      <td>103.0</td>\n",
       "      <td>147.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20.0</td>\n",
       "      <td>79.8</td>\n",
       "      <td>41.1</td>\n",
       "      <td>21.0</td>\n",
       "      <td>48.8</td>\n",
       "      <td>75.0</td>\n",
       "      <td>106.8</td>\n",
       "      <td>150.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>...</td>\n",
       "      <td>105.2</td>\n",
       "      <td>126.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>60.4</td>\n",
       "      <td>48.3</td>\n",
       "      <td>1.0</td>\n",
       "      <td>12.8</td>\n",
       "      <td>62.0</td>\n",
       "      <td>103.0</td>\n",
       "      <td>141.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>19.0</td>\n",
       "      <td>81.9</td>\n",
       "      <td>44.8</td>\n",
       "      <td>8.0</td>\n",
       "      <td>47.5</td>\n",
       "      <td>75.0</td>\n",
       "      <td>122.0</td>\n",
       "      <td>135.0</td>\n",
       "      <td>19.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>...</td>\n",
       "      <td>107.0</td>\n",
       "      <td>144.0</td>\n",
       "      <td>19.0</td>\n",
       "      <td>58.1</td>\n",
       "      <td>28.8</td>\n",
       "      <td>5.0</td>\n",
       "      <td>35.5</td>\n",
       "      <td>58.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>106.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>8.0</td>\n",
       "      <td>80.6</td>\n",
       "      <td>38.3</td>\n",
       "      <td>28.0</td>\n",
       "      <td>61.2</td>\n",
       "      <td>65.5</td>\n",
       "      <td>103.8</td>\n",
       "      <td>138.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>80.5</td>\n",
       "      <td>...</td>\n",
       "      <td>125.5</td>\n",
       "      <td>148.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>77.1</td>\n",
       "      <td>46.2</td>\n",
       "      <td>5.0</td>\n",
       "      <td>47.8</td>\n",
       "      <td>77.5</td>\n",
       "      <td>107.2</td>\n",
       "      <td>139.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>17.0</td>\n",
       "      <td>67.6</td>\n",
       "      <td>34.6</td>\n",
       "      <td>5.0</td>\n",
       "      <td>45.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>89.0</td>\n",
       "      <td>136.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>73.4</td>\n",
       "      <td>...</td>\n",
       "      <td>90.0</td>\n",
       "      <td>141.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>94.6</td>\n",
       "      <td>36.5</td>\n",
       "      <td>38.0</td>\n",
       "      <td>56.0</td>\n",
       "      <td>102.0</td>\n",
       "      <td>116.0</td>\n",
       "      <td>149.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>15.0</td>\n",
       "      <td>76.5</td>\n",
       "      <td>41.0</td>\n",
       "      <td>13.0</td>\n",
       "      <td>39.5</td>\n",
       "      <td>78.0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>138.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>74.6</td>\n",
       "      <td>...</td>\n",
       "      <td>113.5</td>\n",
       "      <td>146.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>58.9</td>\n",
       "      <td>44.7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>15.5</td>\n",
       "      <td>62.0</td>\n",
       "      <td>97.5</td>\n",
       "      <td>133.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>16 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python                                                 Math        \\\n",
       "           count   mean   std   min    25%    50%    75%    max count  mean   \n",
       "sex class                                                                     \n",
       "女   1       17.0   70.3  40.1   2.0   48.0   76.0   96.0  144.0  17.0  83.1   \n",
       "    2       21.0   87.0  46.3   0.0   58.0  103.0  129.0  142.0  21.0  74.0   \n",
       "    3       22.0   69.5  50.5   0.0   28.8   57.5  110.0  147.0  22.0  91.3   \n",
       "    4       24.0   76.6  42.4   6.0   43.8   78.5  113.2  140.0  24.0  44.9   \n",
       "    5       23.0   77.6  45.0   1.0   44.5   79.0  116.0  146.0  23.0  71.7   \n",
       "    6       19.0   83.1  38.5  13.0   54.5   91.0  113.5  137.0  19.0  87.8   \n",
       "    7       26.0   63.0  43.3   0.0   30.0   58.5   90.0  145.0  26.0  68.9   \n",
       "    8       16.0   75.7  46.2  11.0   38.5   59.5  121.8  147.0  16.0  75.4   \n",
       "男   1       18.0   70.9  39.8   1.0   50.5   70.0   91.8  138.0  18.0  79.1   \n",
       "    2       18.0   90.7  42.0  11.0   56.8   98.5  124.8  141.0  18.0  68.6   \n",
       "    3       17.0  113.5  29.6  27.0  102.0  123.0  136.0  146.0  17.0  78.4   \n",
       "    4       20.0   79.8  41.1  21.0   48.8   75.0  106.8  150.0  20.0  68.0   \n",
       "    5       19.0   81.9  44.8   8.0   47.5   75.0  122.0  135.0  19.0  73.0   \n",
       "    6        8.0   80.6  38.3  28.0   61.2   65.5  103.8  138.0   8.0  80.5   \n",
       "    7       17.0   67.6  34.6   5.0   45.0   80.0   89.0  136.0  17.0  73.4   \n",
       "    8       15.0   76.5  41.0  13.0   39.5   78.0  113.0  138.0  15.0  74.6   \n",
       "\n",
       "           ...                  En                                        \\\n",
       "           ...    75%    max count  mean   std   min   25%    50%    75%   \n",
       "sex class  ...                                                             \n",
       "女   1      ...  119.0  140.0  17.0  75.6  49.5   2.0  41.0   57.0  118.0   \n",
       "    2      ...  121.0  145.0  21.0  88.0  45.4   0.0  57.0  103.0  122.0   \n",
       "    3      ...  114.8  150.0  22.0  62.0  43.3   3.0  22.2   61.0   98.8   \n",
       "    4      ...   68.5  106.0  24.0  68.2  40.5   2.0  42.0   55.0   97.8   \n",
       "    5      ...  108.0  134.0  23.0  74.6  41.3   1.0  45.0   75.0  111.0   \n",
       "    6      ...  116.5  139.0  19.0  90.9  40.9  29.0  54.5   99.0  123.0   \n",
       "    7      ...  101.8  131.0  26.0  67.2  47.8   5.0  23.2   67.5  111.2   \n",
       "    8      ...   91.2  150.0  16.0  65.9  48.5   0.0  22.8   57.0  109.8   \n",
       "男   1      ...   96.8  150.0  18.0  91.7  44.9   3.0  57.2  107.0  128.8   \n",
       "    2      ...  102.8  145.0  18.0  75.6  45.7   3.0  44.5   84.5  107.0   \n",
       "    3      ...  108.0  137.0  17.0  67.3  53.1   4.0  17.0   53.0  103.0   \n",
       "    4      ...  105.2  126.0  20.0  60.4  48.3   1.0  12.8   62.0  103.0   \n",
       "    5      ...  107.0  144.0  19.0  58.1  28.8   5.0  35.5   58.0   76.0   \n",
       "    6      ...  125.5  148.0   8.0  77.1  46.2   5.0  47.8   77.5  107.2   \n",
       "    7      ...   90.0  141.0  17.0  94.6  36.5  38.0  56.0  102.0  116.0   \n",
       "    8      ...  113.5  146.0  15.0  58.9  44.7   0.0  15.5   62.0   97.5   \n",
       "\n",
       "                  \n",
       "             max  \n",
       "sex class         \n",
       "女   1      148.0  \n",
       "    2      146.0  \n",
       "    3      137.0  \n",
       "    4      150.0  \n",
       "    5      123.0  \n",
       "    6      149.0  \n",
       "    7      144.0  \n",
       "    8      143.0  \n",
       "男   1      150.0  \n",
       "    2      150.0  \n",
       "    3      147.0  \n",
       "    4      141.0  \n",
       "    5      106.0  \n",
       "    6      139.0  \n",
       "    7      149.0  \n",
       "    8      133.0  \n",
       "\n",
       "[16 rows x 24 columns]"
      ]
     },
     "execution_count": 375,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).describe().round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组聚合apply、transform"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 377,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>70.3</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>87.0</td>\n",
       "      <td>88.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>69.5</td>\n",
       "      <td>62.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>76.6</td>\n",
       "      <td>68.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>77.6</td>\n",
       "      <td>74.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>83.1</td>\n",
       "      <td>90.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>63.0</td>\n",
       "      <td>67.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>75.7</td>\n",
       "      <td>65.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>70.9</td>\n",
       "      <td>91.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>90.7</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113.5</td>\n",
       "      <td>67.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>79.8</td>\n",
       "      <td>60.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>81.9</td>\n",
       "      <td>58.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.6</td>\n",
       "      <td>77.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>67.6</td>\n",
       "      <td>94.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.5</td>\n",
       "      <td>58.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Python    En\n",
       "sex class              \n",
       "女   1        70.3  75.6\n",
       "    2        87.0  88.0\n",
       "    3        69.5  62.0\n",
       "    4        76.6  68.2\n",
       "    5        77.6  74.6\n",
       "    6        83.1  90.9\n",
       "    7        63.0  67.2\n",
       "    8        75.7  65.9\n",
       "男   1        70.9  91.7\n",
       "    2        90.7  75.6\n",
       "    3       113.5  67.3\n",
       "    4        79.8  60.4\n",
       "    5        81.9  58.1\n",
       "    6        80.6  77.1\n",
       "    7        67.6  94.6\n",
       "    8        76.5  58.9"
      ]
     },
     "execution_count": 377,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# apply聚合结果，少\n",
    "df.groupby(by = ['sex','class'])[['Python','En']].apply(np.mean).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 379,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>63.0</td>\n",
       "      <td>67.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>76.6</td>\n",
       "      <td>68.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>79.8</td>\n",
       "      <td>60.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70.3</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>90.7</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>79.8</td>\n",
       "      <td>60.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>83.1</td>\n",
       "      <td>90.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>81.9</td>\n",
       "      <td>58.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>75.7</td>\n",
       "      <td>65.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>70.9</td>\n",
       "      <td>91.7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Python    En\n",
       "0      63.0  67.2\n",
       "1      76.6  68.2\n",
       "2      79.8  60.4\n",
       "3      70.3  75.6\n",
       "4      90.7  75.6\n",
       "..      ...   ...\n",
       "295    79.8  60.4\n",
       "296    83.1  90.9\n",
       "297    81.9  58.1\n",
       "298    75.7  65.9\n",
       "299    70.9  91.7\n",
       "\n",
       "[300 rows x 2 columns]"
      ]
     },
     "execution_count": 379,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# transform 计算，返回的结果，还是DataFrame长度\n",
    "df.groupby(by = ['sex','class'])[['Python','En']].transform(np.mean).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 378,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>63.0</td>\n",
       "      <td>67.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>76.6</td>\n",
       "      <td>68.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>79.8</td>\n",
       "      <td>60.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70.3</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>90.7</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>79.8</td>\n",
       "      <td>60.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>83.1</td>\n",
       "      <td>90.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>81.9</td>\n",
       "      <td>58.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>75.7</td>\n",
       "      <td>65.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>70.9</td>\n",
       "      <td>91.7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Python    En\n",
       "0      63.0  67.2\n",
       "1      76.6  68.2\n",
       "2      79.8  60.4\n",
       "3      70.3  75.6\n",
       "4      90.7  75.6\n",
       "..      ...   ...\n",
       "295    79.8  60.4\n",
       "296    83.1  90.9\n",
       "297    81.9  58.1\n",
       "298    75.7  65.9\n",
       "299    70.9  91.7\n",
       "\n",
       "[300 rows x 2 columns]"
      ]
     },
     "execution_count": 378,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def _mean(x): #自己定义求平均值方法\n",
    "    return np.round(x.mean(),1)\n",
    "df.groupby(by = ['sex','class'])[['Python','En']].transform(_mean)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组聚合agg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 381,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"3\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>amax</th>\n",
       "      <th>amin</th>\n",
       "      <th>mean</th>\n",
       "      <th>amax</th>\n",
       "      <th>amin</th>\n",
       "      <th>mean</th>\n",
       "      <th>amax</th>\n",
       "      <th>amin</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>70.3</td>\n",
       "      <td>144</td>\n",
       "      <td>2</td>\n",
       "      <td>83.1</td>\n",
       "      <td>140</td>\n",
       "      <td>11</td>\n",
       "      <td>75.6</td>\n",
       "      <td>148</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>87.0</td>\n",
       "      <td>142</td>\n",
       "      <td>0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>145</td>\n",
       "      <td>1</td>\n",
       "      <td>88.0</td>\n",
       "      <td>146</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>69.5</td>\n",
       "      <td>147</td>\n",
       "      <td>0</td>\n",
       "      <td>91.3</td>\n",
       "      <td>150</td>\n",
       "      <td>20</td>\n",
       "      <td>62.0</td>\n",
       "      <td>137</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>76.6</td>\n",
       "      <td>140</td>\n",
       "      <td>6</td>\n",
       "      <td>44.9</td>\n",
       "      <td>106</td>\n",
       "      <td>0</td>\n",
       "      <td>68.2</td>\n",
       "      <td>150</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>77.6</td>\n",
       "      <td>146</td>\n",
       "      <td>1</td>\n",
       "      <td>71.7</td>\n",
       "      <td>134</td>\n",
       "      <td>4</td>\n",
       "      <td>74.6</td>\n",
       "      <td>123</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>83.1</td>\n",
       "      <td>137</td>\n",
       "      <td>13</td>\n",
       "      <td>87.8</td>\n",
       "      <td>139</td>\n",
       "      <td>9</td>\n",
       "      <td>90.9</td>\n",
       "      <td>149</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>63.0</td>\n",
       "      <td>145</td>\n",
       "      <td>0</td>\n",
       "      <td>68.9</td>\n",
       "      <td>131</td>\n",
       "      <td>0</td>\n",
       "      <td>67.2</td>\n",
       "      <td>144</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>75.7</td>\n",
       "      <td>147</td>\n",
       "      <td>11</td>\n",
       "      <td>75.4</td>\n",
       "      <td>150</td>\n",
       "      <td>7</td>\n",
       "      <td>65.9</td>\n",
       "      <td>143</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>70.9</td>\n",
       "      <td>138</td>\n",
       "      <td>1</td>\n",
       "      <td>79.1</td>\n",
       "      <td>150</td>\n",
       "      <td>28</td>\n",
       "      <td>91.7</td>\n",
       "      <td>150</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>90.7</td>\n",
       "      <td>141</td>\n",
       "      <td>11</td>\n",
       "      <td>68.6</td>\n",
       "      <td>145</td>\n",
       "      <td>5</td>\n",
       "      <td>75.6</td>\n",
       "      <td>150</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113.5</td>\n",
       "      <td>146</td>\n",
       "      <td>27</td>\n",
       "      <td>78.4</td>\n",
       "      <td>137</td>\n",
       "      <td>8</td>\n",
       "      <td>67.3</td>\n",
       "      <td>147</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>79.8</td>\n",
       "      <td>150</td>\n",
       "      <td>21</td>\n",
       "      <td>68.0</td>\n",
       "      <td>126</td>\n",
       "      <td>8</td>\n",
       "      <td>60.4</td>\n",
       "      <td>141</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>81.9</td>\n",
       "      <td>135</td>\n",
       "      <td>8</td>\n",
       "      <td>73.0</td>\n",
       "      <td>144</td>\n",
       "      <td>1</td>\n",
       "      <td>58.1</td>\n",
       "      <td>106</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.6</td>\n",
       "      <td>138</td>\n",
       "      <td>28</td>\n",
       "      <td>80.5</td>\n",
       "      <td>148</td>\n",
       "      <td>25</td>\n",
       "      <td>77.1</td>\n",
       "      <td>139</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>67.6</td>\n",
       "      <td>136</td>\n",
       "      <td>5</td>\n",
       "      <td>73.4</td>\n",
       "      <td>141</td>\n",
       "      <td>28</td>\n",
       "      <td>94.6</td>\n",
       "      <td>149</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.5</td>\n",
       "      <td>138</td>\n",
       "      <td>13</td>\n",
       "      <td>74.6</td>\n",
       "      <td>146</td>\n",
       "      <td>6</td>\n",
       "      <td>58.9</td>\n",
       "      <td>133</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python            Math              En          \n",
       "            mean amax amin  mean amax amin  mean amax amin\n",
       "sex class                                                 \n",
       "女   1       70.3  144    2  83.1  140   11  75.6  148    2\n",
       "    2       87.0  142    0  74.0  145    1  88.0  146    0\n",
       "    3       69.5  147    0  91.3  150   20  62.0  137    3\n",
       "    4       76.6  140    6  44.9  106    0  68.2  150    2\n",
       "    5       77.6  146    1  71.7  134    4  74.6  123    1\n",
       "    6       83.1  137   13  87.8  139    9  90.9  149   29\n",
       "    7       63.0  145    0  68.9  131    0  67.2  144    5\n",
       "    8       75.7  147   11  75.4  150    7  65.9  143    0\n",
       "男   1       70.9  138    1  79.1  150   28  91.7  150    3\n",
       "    2       90.7  141   11  68.6  145    5  75.6  150    3\n",
       "    3      113.5  146   27  78.4  137    8  67.3  147    4\n",
       "    4       79.8  150   21  68.0  126    8  60.4  141    1\n",
       "    5       81.9  135    8  73.0  144    1  58.1  106    5\n",
       "    6       80.6  138   28  80.5  148   25  77.1  139    5\n",
       "    7       67.6  136    5  73.4  141   28  94.6  149   38\n",
       "    8       76.5  138   13  74.6  146    6  58.9  133    0"
      ]
     },
     "execution_count": 381,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).agg([np.mean,np.max,np.min]).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 382,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"3\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>平均值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>平均值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>平均值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>70.3</td>\n",
       "      <td>144</td>\n",
       "      <td>2</td>\n",
       "      <td>83.1</td>\n",
       "      <td>140</td>\n",
       "      <td>11</td>\n",
       "      <td>75.6</td>\n",
       "      <td>148</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>87.0</td>\n",
       "      <td>142</td>\n",
       "      <td>0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>145</td>\n",
       "      <td>1</td>\n",
       "      <td>88.0</td>\n",
       "      <td>146</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>69.5</td>\n",
       "      <td>147</td>\n",
       "      <td>0</td>\n",
       "      <td>91.3</td>\n",
       "      <td>150</td>\n",
       "      <td>20</td>\n",
       "      <td>62.0</td>\n",
       "      <td>137</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>76.6</td>\n",
       "      <td>140</td>\n",
       "      <td>6</td>\n",
       "      <td>44.9</td>\n",
       "      <td>106</td>\n",
       "      <td>0</td>\n",
       "      <td>68.2</td>\n",
       "      <td>150</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>77.6</td>\n",
       "      <td>146</td>\n",
       "      <td>1</td>\n",
       "      <td>71.7</td>\n",
       "      <td>134</td>\n",
       "      <td>4</td>\n",
       "      <td>74.6</td>\n",
       "      <td>123</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>83.1</td>\n",
       "      <td>137</td>\n",
       "      <td>13</td>\n",
       "      <td>87.8</td>\n",
       "      <td>139</td>\n",
       "      <td>9</td>\n",
       "      <td>90.9</td>\n",
       "      <td>149</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>63.0</td>\n",
       "      <td>145</td>\n",
       "      <td>0</td>\n",
       "      <td>68.9</td>\n",
       "      <td>131</td>\n",
       "      <td>0</td>\n",
       "      <td>67.2</td>\n",
       "      <td>144</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>75.7</td>\n",
       "      <td>147</td>\n",
       "      <td>11</td>\n",
       "      <td>75.4</td>\n",
       "      <td>150</td>\n",
       "      <td>7</td>\n",
       "      <td>65.9</td>\n",
       "      <td>143</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>70.9</td>\n",
       "      <td>138</td>\n",
       "      <td>1</td>\n",
       "      <td>79.1</td>\n",
       "      <td>150</td>\n",
       "      <td>28</td>\n",
       "      <td>91.7</td>\n",
       "      <td>150</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>90.7</td>\n",
       "      <td>141</td>\n",
       "      <td>11</td>\n",
       "      <td>68.6</td>\n",
       "      <td>145</td>\n",
       "      <td>5</td>\n",
       "      <td>75.6</td>\n",
       "      <td>150</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113.5</td>\n",
       "      <td>146</td>\n",
       "      <td>27</td>\n",
       "      <td>78.4</td>\n",
       "      <td>137</td>\n",
       "      <td>8</td>\n",
       "      <td>67.3</td>\n",
       "      <td>147</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>79.8</td>\n",
       "      <td>150</td>\n",
       "      <td>21</td>\n",
       "      <td>68.0</td>\n",
       "      <td>126</td>\n",
       "      <td>8</td>\n",
       "      <td>60.4</td>\n",
       "      <td>141</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>81.9</td>\n",
       "      <td>135</td>\n",
       "      <td>8</td>\n",
       "      <td>73.0</td>\n",
       "      <td>144</td>\n",
       "      <td>1</td>\n",
       "      <td>58.1</td>\n",
       "      <td>106</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.6</td>\n",
       "      <td>138</td>\n",
       "      <td>28</td>\n",
       "      <td>80.5</td>\n",
       "      <td>148</td>\n",
       "      <td>25</td>\n",
       "      <td>77.1</td>\n",
       "      <td>139</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>67.6</td>\n",
       "      <td>136</td>\n",
       "      <td>5</td>\n",
       "      <td>73.4</td>\n",
       "      <td>141</td>\n",
       "      <td>28</td>\n",
       "      <td>94.6</td>\n",
       "      <td>149</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.5</td>\n",
       "      <td>138</td>\n",
       "      <td>13</td>\n",
       "      <td>74.6</td>\n",
       "      <td>146</td>\n",
       "      <td>6</td>\n",
       "      <td>58.9</td>\n",
       "      <td>133</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python           Math             En         \n",
       "             平均值  最大值 最小值   平均值  最大值 最小值   平均值  最大值 最小值\n",
       "sex class                                              \n",
       "女   1       70.3  144   2  83.1  140  11  75.6  148   2\n",
       "    2       87.0  142   0  74.0  145   1  88.0  146   0\n",
       "    3       69.5  147   0  91.3  150  20  62.0  137   3\n",
       "    4       76.6  140   6  44.9  106   0  68.2  150   2\n",
       "    5       77.6  146   1  71.7  134   4  74.6  123   1\n",
       "    6       83.1  137  13  87.8  139   9  90.9  149  29\n",
       "    7       63.0  145   0  68.9  131   0  67.2  144   5\n",
       "    8       75.7  147  11  75.4  150   7  65.9  143   0\n",
       "男   1       70.9  138   1  79.1  150  28  91.7  150   3\n",
       "    2       90.7  141  11  68.6  145   5  75.6  150   3\n",
       "    3      113.5  146  27  78.4  137   8  67.3  147   4\n",
       "    4       79.8  150  21  68.0  126   8  60.4  141   1\n",
       "    5       81.9  135   8  73.0  144   1  58.1  106   5\n",
       "    6       80.6  138  28  80.5  148  25  77.1  139   5\n",
       "    7       67.6  136   5  73.4  141  28  94.6  149  38\n",
       "    8       76.5  138  13  74.6  146   6  58.9  133   0"
      ]
     },
     "execution_count": 382,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).agg([('平均值',np.mean),('最大值',np.max),('最小值',np.min)]).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 386,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>amin</th>\n",
       "      <th>mean</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>144</td>\n",
       "      <td>2</td>\n",
       "      <td>11</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>142</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>88.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>147</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>62.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>140</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>68.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>146</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>74.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>137</td>\n",
       "      <td>13</td>\n",
       "      <td>9</td>\n",
       "      <td>90.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>145</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>67.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>147</td>\n",
       "      <td>11</td>\n",
       "      <td>7</td>\n",
       "      <td>65.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>138</td>\n",
       "      <td>1</td>\n",
       "      <td>28</td>\n",
       "      <td>91.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>141</td>\n",
       "      <td>11</td>\n",
       "      <td>5</td>\n",
       "      <td>75.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>146</td>\n",
       "      <td>27</td>\n",
       "      <td>8</td>\n",
       "      <td>67.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>150</td>\n",
       "      <td>21</td>\n",
       "      <td>8</td>\n",
       "      <td>60.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>135</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>58.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>138</td>\n",
       "      <td>28</td>\n",
       "      <td>25</td>\n",
       "      <td>77.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>136</td>\n",
       "      <td>5</td>\n",
       "      <td>28</td>\n",
       "      <td>94.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>138</td>\n",
       "      <td>13</td>\n",
       "      <td>6</td>\n",
       "      <td>58.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python     Math    En\n",
       "             最大值 最小值 amin  mean\n",
       "sex class                      \n",
       "女   1        144   2   11  75.6\n",
       "    2        142   0    1  88.0\n",
       "    3        147   0   20  62.0\n",
       "    4        140   6    0  68.2\n",
       "    5        146   1    4  74.6\n",
       "    6        137  13    9  90.9\n",
       "    7        145   0    0  67.2\n",
       "    8        147  11    7  65.9\n",
       "男   1        138   1   28  91.7\n",
       "    2        141  11    5  75.6\n",
       "    3        146  27    8  67.3\n",
       "    4        150  21    8  60.4\n",
       "    5        135   8    1  58.1\n",
       "    6        138  28   25  77.1\n",
       "    7        136   5   28  94.6\n",
       "    8        138  13    6  58.9"
      ]
     },
     "execution_count": 386,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 不同列进行不同计算\n",
    "df.groupby(by = ['sex','class']).agg({'Python':np.max,'Math':np.min,'En':np.mean}).round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 透视表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 389,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>En</th>\n",
       "      <th>Python</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>75.6</td>\n",
       "      <td>70.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>88.0</td>\n",
       "      <td>87.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>62.0</td>\n",
       "      <td>69.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>68.2</td>\n",
       "      <td>76.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>74.6</td>\n",
       "      <td>77.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>90.9</td>\n",
       "      <td>83.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>67.2</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>65.9</td>\n",
       "      <td>75.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>91.7</td>\n",
       "      <td>70.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>75.6</td>\n",
       "      <td>90.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>67.3</td>\n",
       "      <td>113.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>60.4</td>\n",
       "      <td>79.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>58.1</td>\n",
       "      <td>81.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>77.1</td>\n",
       "      <td>80.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>94.6</td>\n",
       "      <td>67.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>58.9</td>\n",
       "      <td>76.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             En  Python\n",
       "sex class              \n",
       "女   1      75.6    70.3\n",
       "    2      88.0    87.0\n",
       "    3      62.0    69.5\n",
       "    4      68.2    76.6\n",
       "    5      74.6    77.6\n",
       "    6      90.9    83.1\n",
       "    7      67.2    63.0\n",
       "    8      65.9    75.7\n",
       "男   1      91.7    70.9\n",
       "    2      75.6    90.7\n",
       "    3      67.3   113.5\n",
       "    4      60.4    79.8\n",
       "    5      58.1    81.9\n",
       "    6      77.1    80.6\n",
       "    7      94.6    67.6\n",
       "    8      58.9    76.5"
      ]
     },
     "execution_count": 389,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.pivot_table(values=['Python','En'],index = ['sex','class'],aggfunc='mean').round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 390,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th>Python</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>方差</th>\n",
       "      <th>标准差</th>\n",
       "      <th>计数</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>平均值</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>2454.2</td>\n",
       "      <td>49.5</td>\n",
       "      <td>17.0</td>\n",
       "      <td>140</td>\n",
       "      <td>11</td>\n",
       "      <td>70.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2057.1</td>\n",
       "      <td>45.4</td>\n",
       "      <td>21.0</td>\n",
       "      <td>145</td>\n",
       "      <td>1</td>\n",
       "      <td>87.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1873.6</td>\n",
       "      <td>43.3</td>\n",
       "      <td>22.0</td>\n",
       "      <td>150</td>\n",
       "      <td>20</td>\n",
       "      <td>69.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1643.5</td>\n",
       "      <td>40.5</td>\n",
       "      <td>24.0</td>\n",
       "      <td>106</td>\n",
       "      <td>0</td>\n",
       "      <td>76.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1704.1</td>\n",
       "      <td>41.3</td>\n",
       "      <td>23.0</td>\n",
       "      <td>134</td>\n",
       "      <td>4</td>\n",
       "      <td>77.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1673.1</td>\n",
       "      <td>40.9</td>\n",
       "      <td>19.0</td>\n",
       "      <td>139</td>\n",
       "      <td>9</td>\n",
       "      <td>83.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2281.4</td>\n",
       "      <td>47.8</td>\n",
       "      <td>26.0</td>\n",
       "      <td>131</td>\n",
       "      <td>0</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2354.7</td>\n",
       "      <td>48.5</td>\n",
       "      <td>16.0</td>\n",
       "      <td>150</td>\n",
       "      <td>7</td>\n",
       "      <td>75.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>2013.5</td>\n",
       "      <td>44.9</td>\n",
       "      <td>18.0</td>\n",
       "      <td>150</td>\n",
       "      <td>28</td>\n",
       "      <td>70.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2089.2</td>\n",
       "      <td>45.7</td>\n",
       "      <td>18.0</td>\n",
       "      <td>145</td>\n",
       "      <td>5</td>\n",
       "      <td>90.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2822.3</td>\n",
       "      <td>53.1</td>\n",
       "      <td>17.0</td>\n",
       "      <td>137</td>\n",
       "      <td>8</td>\n",
       "      <td>113.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2337.1</td>\n",
       "      <td>48.3</td>\n",
       "      <td>20.0</td>\n",
       "      <td>126</td>\n",
       "      <td>8</td>\n",
       "      <td>79.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>828.3</td>\n",
       "      <td>28.8</td>\n",
       "      <td>19.0</td>\n",
       "      <td>144</td>\n",
       "      <td>1</td>\n",
       "      <td>81.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2132.4</td>\n",
       "      <td>46.2</td>\n",
       "      <td>8.0</td>\n",
       "      <td>148</td>\n",
       "      <td>25</td>\n",
       "      <td>80.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1333.4</td>\n",
       "      <td>36.5</td>\n",
       "      <td>17.0</td>\n",
       "      <td>141</td>\n",
       "      <td>28</td>\n",
       "      <td>67.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1999.2</td>\n",
       "      <td>44.7</td>\n",
       "      <td>15.0</td>\n",
       "      <td>146</td>\n",
       "      <td>6</td>\n",
       "      <td>76.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               En             Math     Python\n",
       "               方差   标准差    计数  最大值 最小值    平均值\n",
       "sex class                                    \n",
       "女   1      2454.2  49.5  17.0  140  11   70.3\n",
       "    2      2057.1  45.4  21.0  145   1   87.0\n",
       "    3      1873.6  43.3  22.0  150  20   69.5\n",
       "    4      1643.5  40.5  24.0  106   0   76.6\n",
       "    5      1704.1  41.3  23.0  134   4   77.6\n",
       "    6      1673.1  40.9  19.0  139   9   83.1\n",
       "    7      2281.4  47.8  26.0  131   0   63.0\n",
       "    8      2354.7  48.5  16.0  150   7   75.7\n",
       "男   1      2013.5  44.9  18.0  150  28   70.9\n",
       "    2      2089.2  45.7  18.0  145   5   90.7\n",
       "    3      2822.3  53.1  17.0  137   8  113.5\n",
       "    4      2337.1  48.3  20.0  126   8   79.8\n",
       "    5       828.3  28.8  19.0  144   1   81.9\n",
       "    6      2132.4  46.2   8.0  148  25   80.6\n",
       "    7      1333.4  36.5  17.0  141  28   67.6\n",
       "    8      1999.2  44.7  15.0  146   6   76.5"
      ]
     },
     "execution_count": 390,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.pivot_table(values=['Python','Math','En'], # 要’透视‘值\n",
    "               index = ['sex','class'], # 索引，根据什么进行’透视‘ == 分组\n",
    "               aggfunc={'Python':[('平均值',np.mean)],\n",
    "                        'Math':[('最小值',np.min),('最大值',np.max)],\n",
    "                        'En':[('标准差',np.std),('方差',np.var),('计数',np.size)]}).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 391,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>平均值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>标准差</th>\n",
       "      <th>方差</th>\n",
       "      <th>计数</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>70.3</td>\n",
       "      <td>11</td>\n",
       "      <td>140</td>\n",
       "      <td>49.5</td>\n",
       "      <td>2454.2</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>87.0</td>\n",
       "      <td>1</td>\n",
       "      <td>145</td>\n",
       "      <td>45.4</td>\n",
       "      <td>2057.1</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>69.5</td>\n",
       "      <td>20</td>\n",
       "      <td>150</td>\n",
       "      <td>43.3</td>\n",
       "      <td>1873.6</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>76.6</td>\n",
       "      <td>0</td>\n",
       "      <td>106</td>\n",
       "      <td>40.5</td>\n",
       "      <td>1643.5</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>77.6</td>\n",
       "      <td>4</td>\n",
       "      <td>134</td>\n",
       "      <td>41.3</td>\n",
       "      <td>1704.1</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>83.1</td>\n",
       "      <td>9</td>\n",
       "      <td>139</td>\n",
       "      <td>40.9</td>\n",
       "      <td>1673.1</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>63.0</td>\n",
       "      <td>0</td>\n",
       "      <td>131</td>\n",
       "      <td>47.8</td>\n",
       "      <td>2281.4</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>75.7</td>\n",
       "      <td>7</td>\n",
       "      <td>150</td>\n",
       "      <td>48.5</td>\n",
       "      <td>2354.7</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>70.9</td>\n",
       "      <td>28</td>\n",
       "      <td>150</td>\n",
       "      <td>44.9</td>\n",
       "      <td>2013.5</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>90.7</td>\n",
       "      <td>5</td>\n",
       "      <td>145</td>\n",
       "      <td>45.7</td>\n",
       "      <td>2089.2</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113.5</td>\n",
       "      <td>8</td>\n",
       "      <td>137</td>\n",
       "      <td>53.1</td>\n",
       "      <td>2822.3</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>79.8</td>\n",
       "      <td>8</td>\n",
       "      <td>126</td>\n",
       "      <td>48.3</td>\n",
       "      <td>2337.1</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>81.9</td>\n",
       "      <td>1</td>\n",
       "      <td>144</td>\n",
       "      <td>28.8</td>\n",
       "      <td>828.3</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.6</td>\n",
       "      <td>25</td>\n",
       "      <td>148</td>\n",
       "      <td>46.2</td>\n",
       "      <td>2132.4</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>67.6</td>\n",
       "      <td>28</td>\n",
       "      <td>141</td>\n",
       "      <td>36.5</td>\n",
       "      <td>1333.4</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.5</td>\n",
       "      <td>6</td>\n",
       "      <td>146</td>\n",
       "      <td>44.7</td>\n",
       "      <td>1999.2</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python Math         En            \n",
       "             平均值  最小值  最大值   标准差      方差  计数\n",
       "sex class                                   \n",
       "女   1       70.3   11  140  49.5  2454.2  17\n",
       "    2       87.0    1  145  45.4  2057.1  21\n",
       "    3       69.5   20  150  43.3  1873.6  22\n",
       "    4       76.6    0  106  40.5  1643.5  24\n",
       "    5       77.6    4  134  41.3  1704.1  23\n",
       "    6       83.1    9  139  40.9  1673.1  19\n",
       "    7       63.0    0  131  47.8  2281.4  26\n",
       "    8       75.7    7  150  48.5  2354.7  16\n",
       "男   1       70.9   28  150  44.9  2013.5  18\n",
       "    2       90.7    5  145  45.7  2089.2  18\n",
       "    3      113.5    8  137  53.1  2822.3  17\n",
       "    4       79.8    8  126  48.3  2337.1  20\n",
       "    5       81.9    1  144  28.8   828.3  19\n",
       "    6       80.6   25  148  46.2  2132.4   8\n",
       "    7       67.6   28  141  36.5  1333.4  17\n",
       "    8       76.5    6  146  44.7  1999.2  15"
      ]
     },
     "execution_count": 391,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).agg({'Python':[('平均值',np.mean)],\n",
    "                        'Math':[('最小值',np.min),('最大值',np.max)],\n",
    "                        'En':[('标准差',np.std),('方差',np.var),('计数',np.size)]}).round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 时间序列"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 时间戳操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 399,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 20:00:00')"
      ]
     },
     "execution_count": 399,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp('2020.09.15 20') # 时刻数据，具体点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 400,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Period('2020-09', 'M')"
      ]
     },
     "execution_count": 400,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Period('2020.09.15',freq='M') # 时期数据，表示一段时间，频率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 403,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2020-09-15', '2020-09-16', '2020-09-17', '2020-09-18',\n",
       "               '2020-09-19', '2020-09-20', '2020-09-21', '2020-09-22',\n",
       "               '2020-09-23', '2020-09-24'],\n",
       "              dtype='datetime64[ns]', freq='D')"
      ]
     },
     "execution_count": 403,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "index = pd.date_range('2020.09.15',freq='D',periods=10)\n",
    "index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 402,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PeriodIndex(['2020-09-15', '2020-09-16', '2020-09-17', '2020-09-18',\n",
       "             '2020-09-19', '2020-09-20', '2020-09-21', '2020-09-22',\n",
       "             '2020-09-23', '2020-09-24'],\n",
       "            dtype='period[D]', freq='D')"
      ]
     },
     "execution_count": 402,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.period_range('2020.09.15',periods=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 404,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    7\n",
       "2020-09-16    6\n",
       "2020-09-17    3\n",
       "2020-09-18    1\n",
       "2020-09-19    4\n",
       "2020-09-20    8\n",
       "2020-09-21    2\n",
       "2020-09-22    8\n",
       "2020-09-23    3\n",
       "2020-09-24    3\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 404,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts = pd.Series(np.random.randint(0,10,size = 10),index = index)\n",
    "ts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 405,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2020-09-15', '2020-09-15', '2020-09-15', '2020-09-15'], dtype='datetime64[ns]', freq=None)"
      ]
     },
     "execution_count": 405,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 时间戳的转换\n",
    "pd.to_datetime(['2020.09.15','2020-09-15','2020/09/15','15/09/2020'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 406,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1600171606.469443"
      ]
     },
     "execution_count": 406,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import time\n",
    "time.time() # 秒"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 407,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 12:06:46')"
      ]
     },
     "execution_count": 407,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime(1600171606,unit='s')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 409,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 12:06:46.469000')"
      ]
     },
     "execution_count": 409,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dt = pd.to_datetime(1600171606469,unit='ms') # 世界标准时间\n",
    "dt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 410,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 20:06:46.469000')"
      ]
     },
     "execution_count": 410,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dt + pd.DateOffset(hours = 8) # 北京时间"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 412,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-12-24 12:06:46.469000')"
      ]
     },
     "execution_count": 412,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dt + pd.DateOffset(days = 100) # 100天之后日期"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 时间戳索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 413,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    155\n",
       "2020-09-16     49\n",
       "2020-09-17     71\n",
       "2020-09-18    212\n",
       "2020-09-19     60\n",
       "             ... \n",
       "2021-03-29    104\n",
       "2021-03-30     98\n",
       "2021-03-31    170\n",
       "2021-04-01     54\n",
       "2021-04-02     61\n",
       "Freq: D, Length: 200, dtype: int64"
      ]
     },
     "execution_count": 413,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts = pd.Series(np.random.randint(0,300,size = 200),\n",
    "               index=pd.date_range('2020-09-15',freq='D',periods=200))\n",
    "ts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 414,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "212"
      ]
     },
     "execution_count": 414,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# str字符串，进行索引\n",
    "ts['2020/09/18']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 415,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    155\n",
       "2020-09-16     49\n",
       "2020-09-17     71\n",
       "2020-09-18    212\n",
       "2020-09-19     60\n",
       "2020-09-20     50\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 415,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2020/09/15':'2020.09.20'] # 切片操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 416,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    155\n",
       "2020-09-16     49\n",
       "2020-09-17     71\n",
       "2020-09-18    212\n",
       "2020-09-19     60\n",
       "2020-09-20     50\n",
       "2020-09-21    129\n",
       "2020-09-22    299\n",
       "2020-09-23    189\n",
       "2020-09-24    287\n",
       "2020-09-25     88\n",
       "2020-09-26     65\n",
       "2020-09-27    166\n",
       "2020-09-28    242\n",
       "2020-09-29    187\n",
       "2020-09-30     92\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 416,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2020/09'] # 获取了9月份的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 418,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2021-01-01     42\n",
       "2021-01-02    213\n",
       "2021-01-03    244\n",
       "2021-01-04     15\n",
       "2021-01-05    232\n",
       "             ... \n",
       "2021-03-29    104\n",
       "2021-03-30     98\n",
       "2021-03-31    170\n",
       "2021-04-01     54\n",
       "2021-04-02     61\n",
       "Freq: D, Length: 92, dtype: int64"
      ]
     },
     "execution_count": 418,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2021'] # 获取了2020年的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 419,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "155"
      ]
     },
     "execution_count": 419,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.Timestamp('2020.09.15')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 420,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    155\n",
       "2020-09-16     49\n",
       "2020-09-17     71\n",
       "2020-09-18    212\n",
       "2020-09-19     60\n",
       "2020-09-20     50\n",
       "2020-09-21    129\n",
       "2020-09-22    299\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 420,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.Timestamp('2020.09.15'):pd.Timestamp('2020.09.22')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 425,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Period('2020-09-15', '2D')"
      ]
     },
     "execution_count": 425,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Period('2020.09.15',freq='2D')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 427,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    155\n",
       "2020-09-18    212\n",
       "2020-09-21    129\n",
       "2020-09-24    287\n",
       "2020-09-27    166\n",
       "             ... \n",
       "2021-03-20    187\n",
       "2021-03-23     31\n",
       "2021-03-26    119\n",
       "2021-03-29    104\n",
       "2021-04-01     54\n",
       "Freq: 3D, Length: 67, dtype: int64"
      ]
     },
     "execution_count": 427,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.Timestamp('2020.09.15')::3] # 有间隔的获取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 426,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "ename": "KeyError",
     "evalue": "Period('2020-09-15', '2D')",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-426-0e1e667908db>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mts\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPeriod\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'2020.09.15'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mfreq\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'2D'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/series.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m    880\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    881\u001b[0m         \u001b[0;32melif\u001b[0m \u001b[0mkey_is_scalar\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 882\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_value\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    883\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    884\u001b[0m         if (\n",
      "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/series.py\u001b[0m in \u001b[0;36m_get_value\u001b[0;34m(self, label, takeable)\u001b[0m\n\u001b[1;32m    989\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    990\u001b[0m         \u001b[0;31m# Similar to Index.get_value, but we do not fall back to positional\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 991\u001b[0;31m         \u001b[0mloc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    992\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_values_for_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    993\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/indexes/datetimes.py\u001b[0m in \u001b[0;36mget_loc\u001b[0;34m(self, key, method, tolerance)\u001b[0m\n\u001b[1;32m    620\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    621\u001b[0m             \u001b[0;31m# unrecognized type\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 622\u001b[0;31m             \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    623\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    624\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mKeyError\u001b[0m: Period('2020-09-15', '2D')"
     ]
    }
   ],
   "source": [
    "ts[pd.Period('2020.09.15',freq='2D')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 428,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    155\n",
       "2020-09-16     49\n",
       "2020-09-17     71\n",
       "2020-09-18    212\n",
       "2020-09-19     60\n",
       "2020-09-20     50\n",
       "2020-09-21    129\n",
       "2020-09-22    299\n",
       "2020-09-23    189\n",
       "2020-09-24    287\n",
       "2020-09-25     88\n",
       "2020-09-26     65\n",
       "2020-09-27    166\n",
       "2020-09-28    242\n",
       "2020-09-29    187\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 428,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.date_range('2020.09.15',freq='D',periods=15)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 430,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64Index([2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,\n",
       "            ...\n",
       "            2021, 2021, 2021, 2021, 2021, 2021, 2021, 2021, 2021, 2021],\n",
       "           dtype='int64', length=200)"
      ]
     },
     "execution_count": 430,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.index.year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 431,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64Index([259, 260, 261, 262, 263, 264, 265, 266, 267, 268,\n",
       "            ...\n",
       "             83,  84,  85,  86,  87,  88,  89,  90,  91,  92],\n",
       "           dtype='int64', length=200)"
      ]
     },
     "execution_count": 431,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.index.dayofyear # 202001915 对应着2020年的第259天"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 433,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 434,
   "metadata": {
    "hidden": true,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64Index([38, 38, 38, 38, 38, 38, 39, 39, 39, 39,\n",
       "            ...\n",
       "            12, 12, 12, 12, 12, 13, 13, 13, 13, 13],\n",
       "           dtype='int64', length=200)"
      ]
     },
     "execution_count": 434,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.index.weekofyear # 对应着一年中第多少周"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 435,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-17    155\n",
       "2020-09-18     49\n",
       "2020-09-19     71\n",
       "2020-09-20    212\n",
       "2020-09-21     60\n",
       "             ... \n",
       "2021-03-31    104\n",
       "2021-04-01     98\n",
       "2021-04-02    170\n",
       "2021-04-03     54\n",
       "2021-04-04     61\n",
       "Freq: D, Length: 200, dtype: int64"
      ]
     },
     "execution_count": 435,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods = 2,freq = pd.tseries.offsets.Day()) # 天移动"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 436,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    155\n",
       "2020-09-16     49\n",
       "2020-09-17     71\n",
       "2020-09-18    212\n",
       "2020-09-19     60\n",
       "             ... \n",
       "2021-03-29    104\n",
       "2021-03-30     98\n",
       "2021-03-31    170\n",
       "2021-04-01     54\n",
       "2021-04-02     61\n",
       "Freq: D, Length: 200, dtype: int64"
      ]
     },
     "execution_count": 436,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 时间序列常用操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 440,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01    921\n",
       "2020-01-02    162\n",
       "2020-01-03    336\n",
       "2020-01-04    257\n",
       "2020-01-05    369\n",
       "             ... \n",
       "2020-12-26     12\n",
       "2020-12-27    183\n",
       "2020-12-28    944\n",
       "2020-12-29    821\n",
       "2020-12-30    522\n",
       "Freq: D, Length: 365, dtype: int64"
      ]
     },
     "execution_count": 440,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts = pd.Series(np.random.randint(0,1024,size = 365),\n",
    "               index = pd.date_range('2020/1/1',freq='D',periods=365))\n",
    "ts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 数据移动"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 441,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01      NaN\n",
       "2020-01-02      NaN\n",
       "2020-01-03    921.0\n",
       "2020-01-04    162.0\n",
       "2020-01-05    336.0\n",
       "              ...  \n",
       "2020-12-26    545.0\n",
       "2020-12-27    714.0\n",
       "2020-12-28     12.0\n",
       "2020-12-29    183.0\n",
       "2020-12-30    944.0\n",
       "Freq: D, Length: 365, dtype: float64"
      ]
     },
     "execution_count": 441,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=2) # 数据向后移动2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 442,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01    336.0\n",
       "2020-01-02    257.0\n",
       "2020-01-03    369.0\n",
       "2020-01-04     16.0\n",
       "2020-01-05    724.0\n",
       "              ...  \n",
       "2020-12-26    944.0\n",
       "2020-12-27    821.0\n",
       "2020-12-28    522.0\n",
       "2020-12-29      NaN\n",
       "2020-12-30      NaN\n",
       "Freq: D, Length: 365, dtype: float64"
      ]
     },
     "execution_count": 442,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=-2) # 数据向前移动"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 日期移动"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 455,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-06    921\n",
       "2020-01-07    162\n",
       "2020-01-08    336\n",
       "2020-01-09    257\n",
       "2020-01-10    369\n",
       "             ... \n",
       "2020-12-31     12\n",
       "2021-01-01    183\n",
       "2021-01-02    944\n",
       "2021-01-03    821\n",
       "2021-01-04    522\n",
       "Freq: D, Length: 365, dtype: int64"
      ]
     },
     "execution_count": 455,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=5,freq=pd.tseries.offsets.Day()) # 时间后移；负数，前移"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 444,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2019-08-01    921\n",
       "2019-09-01    162\n",
       "2019-09-01    336\n",
       "2019-09-01    257\n",
       "2019-09-01    369\n",
       "             ... \n",
       "2020-08-01     12\n",
       "2020-08-01    183\n",
       "2020-08-01    944\n",
       "2020-08-01    821\n",
       "2020-08-01    522\n",
       "Length: 365, dtype: int64"
      ]
     },
     "execution_count": 444,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=-5,freq=pd.tseries.offsets.MonthBegin())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 频率转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 446,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-31    932\n",
       "2020-02-29    302\n",
       "2020-03-31    851\n",
       "2020-04-30    903\n",
       "2020-05-31    356\n",
       "2020-06-30    834\n",
       "2020-07-31    846\n",
       "2020-08-31    272\n",
       "2020-09-30    279\n",
       "2020-10-31    256\n",
       "2020-11-30    568\n",
       "Freq: M, dtype: int64"
      ]
     },
     "execution_count": 446,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.asfreq(pd.tseries.offsets.MonthEnd()) # 365天，频率转变成月"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 447,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01    921\n",
       "2020-01-08     75\n",
       "2020-01-15    518\n",
       "2020-01-22    817\n",
       "2020-01-29    534\n",
       "2020-02-05    624\n",
       "2020-02-12    959\n",
       "2020-02-19    304\n",
       "2020-02-26    424\n",
       "2020-03-04    839\n",
       "2020-03-11     93\n",
       "2020-03-18    856\n",
       "2020-03-25    436\n",
       "2020-04-01    590\n",
       "2020-04-08    532\n",
       "2020-04-15    875\n",
       "2020-04-22    699\n",
       "2020-04-29    840\n",
       "2020-05-06    753\n",
       "2020-05-13    571\n",
       "2020-05-20    370\n",
       "2020-05-27    479\n",
       "2020-06-03     20\n",
       "2020-06-10    172\n",
       "2020-06-17    357\n",
       "2020-06-24    444\n",
       "2020-07-01    439\n",
       "2020-07-08    785\n",
       "2020-07-15    138\n",
       "2020-07-22    304\n",
       "2020-07-29    120\n",
       "2020-08-05    114\n",
       "2020-08-12     95\n",
       "2020-08-19    784\n",
       "2020-08-26    191\n",
       "2020-09-02    234\n",
       "2020-09-09    259\n",
       "2020-09-16    944\n",
       "2020-09-23    219\n",
       "2020-09-30    279\n",
       "2020-10-07    970\n",
       "2020-10-14    492\n",
       "2020-10-21    843\n",
       "2020-10-28    600\n",
       "2020-11-04    385\n",
       "2020-11-11    796\n",
       "2020-11-18    959\n",
       "2020-11-25    719\n",
       "2020-12-02    317\n",
       "2020-12-09    539\n",
       "2020-12-16    861\n",
       "2020-12-23    895\n",
       "2020-12-30    522\n",
       "Freq: W, dtype: int64"
      ]
     },
     "execution_count": 447,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.asfreq(pd.tseries.offsets.Week()) # 转变成周"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 454,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01 00:00:00    921\n",
       "2020-01-01 01:00:00      0\n",
       "2020-01-01 02:00:00      0\n",
       "2020-01-01 03:00:00      0\n",
       "2020-01-01 04:00:00      0\n",
       "                      ... \n",
       "2020-12-29 20:00:00      0\n",
       "2020-12-29 21:00:00      0\n",
       "2020-12-29 22:00:00      0\n",
       "2020-12-29 23:00:00      0\n",
       "2020-12-30 00:00:00    522\n",
       "Freq: H, Length: 8737, dtype: int64"
      ]
     },
     "execution_count": 454,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.asfreq(pd.tseries.offsets.Hour(),fill_value=0) # 时间频率转换从天变换为小时，空数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 452,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "302"
      ]
     },
     "execution_count": 452,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2020/02/29']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 重采样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 457,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-31    16046\n",
       "2020-02-29    13268\n",
       "2020-03-31    15429\n",
       "2020-04-30    18695\n",
       "2020-05-31    15866\n",
       "2020-06-30    12979\n",
       "2020-07-31    16648\n",
       "2020-08-31    15695\n",
       "2020-09-30    16462\n",
       "2020-10-31    20121\n",
       "2020-11-30    14481\n",
       "2020-12-31    13503\n",
       "Freq: M, dtype: int64"
      ]
     },
     "execution_count": 457,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 时间序列重采样和 之前分组聚合有一拼\n",
    "ts.resample(rule = 'M').agg(np.sum)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 459,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "'DatetimeIndexResampler' object has no attribute 'cumsum'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-459-57b733967b56>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mts\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresample\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrule\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'3M'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcumsum\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/resample.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(self, attr)\u001b[0m\n\u001b[1;32m    113\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mattr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    114\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 115\u001b[0;31m         \u001b[0;32mreturn\u001b[0m \u001b[0mobject\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mattr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    116\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    117\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m__iter__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mAttributeError\u001b[0m: 'DatetimeIndexResampler' object has no attribute 'cumsum'"
     ]
    }
   ],
   "source": [
    "ts.resample(rule = '3M').cumsum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "np.cum"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 460,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-31     16046\n",
       "2020-04-30     63438\n",
       "2020-07-31    108931\n",
       "2020-10-31    161209\n",
       "2021-01-31    189193\n",
       "Freq: 3M, dtype: int64"
      ]
     },
     "execution_count": 460,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重采样，就是按季度进行计算\n",
    "ts.resample(rule='3M').agg(np.sum).cumsum()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### DataFrame重采样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 461,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "      <th>time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3</td>\n",
       "      <td>77</td>\n",
       "      <td>2020-09-15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>48</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-09-16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>10</td>\n",
       "      <td>88</td>\n",
       "      <td>2020-09-17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>90</td>\n",
       "      <td>66</td>\n",
       "      <td>2020-09-18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>71</td>\n",
       "      <td>77</td>\n",
       "      <td>2020-09-19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>360</th>\n",
       "      <td>20</td>\n",
       "      <td>69</td>\n",
       "      <td>2021-09-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>361</th>\n",
       "      <td>38</td>\n",
       "      <td>15</td>\n",
       "      <td>2021-09-11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>362</th>\n",
       "      <td>65</td>\n",
       "      <td>29</td>\n",
       "      <td>2021-09-12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363</th>\n",
       "      <td>29</td>\n",
       "      <td>84</td>\n",
       "      <td>2021-09-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>364</th>\n",
       "      <td>23</td>\n",
       "      <td>35</td>\n",
       "      <td>2021-09-14</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>365 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     price  volume       time\n",
       "0        3      77 2020-09-15\n",
       "1       48       1 2020-09-16\n",
       "2       10      88 2020-09-17\n",
       "3       90      66 2020-09-18\n",
       "4       71      77 2020-09-19\n",
       "..     ...     ...        ...\n",
       "360     20      69 2021-09-10\n",
       "361     38      15 2021-09-11\n",
       "362     65      29 2021-09-12\n",
       "363     29      84 2021-09-13\n",
       "364     23      35 2021-09-14\n",
       "\n",
       "[365 rows x 3 columns]"
      ]
     },
     "execution_count": 461,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'price':np.random.randint(0,100,size = 365),\n",
    "                          'volume':np.random.randint(0,100,size = 365),\n",
    "                          'time':pd.date_range('2020.09.15',periods=365)})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 463,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>743</td>\n",
       "      <td>745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>1541</td>\n",
       "      <td>1187</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>1239</td>\n",
       "      <td>1428</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>1672</td>\n",
       "      <td>1488</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>1415</td>\n",
       "      <td>1570</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>1366</td>\n",
       "      <td>1612</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>1702</td>\n",
       "      <td>1620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>1500</td>\n",
       "      <td>1306</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>1571</td>\n",
       "      <td>1791</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>1434</td>\n",
       "      <td>1582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>1570</td>\n",
       "      <td>1681</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>1611</td>\n",
       "      <td>1665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>628</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            price  volume\n",
       "time                     \n",
       "2020-09-30    743     745\n",
       "2020-10-31   1541    1187\n",
       "2020-11-30   1239    1428\n",
       "2020-12-31   1672    1488\n",
       "2021-01-31   1415    1570\n",
       "2021-02-28   1366    1612\n",
       "2021-03-31   1702    1620\n",
       "2021-04-30   1500    1306\n",
       "2021-05-31   1571    1791\n",
       "2021-06-30   1434    1582\n",
       "2021-07-31   1570    1681\n",
       "2021-08-31   1611    1665\n",
       "2021-09-30    628     711"
      ]
     },
     "execution_count": 463,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.resample(rule = 'M',on = 'time').sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 464,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>743</td>\n",
       "      <td>745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>1541</td>\n",
       "      <td>1187</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>1239</td>\n",
       "      <td>1428</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>1672</td>\n",
       "      <td>1488</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>1415</td>\n",
       "      <td>1570</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>1366</td>\n",
       "      <td>1612</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>1702</td>\n",
       "      <td>1620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>1500</td>\n",
       "      <td>1306</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>1571</td>\n",
       "      <td>1791</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>1434</td>\n",
       "      <td>1582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>1570</td>\n",
       "      <td>1681</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>1611</td>\n",
       "      <td>1665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>628</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            price  volume\n",
       "time                     \n",
       "2020-09-30    743     745\n",
       "2020-10-31   1541    1187\n",
       "2020-11-30   1239    1428\n",
       "2020-12-31   1672    1488\n",
       "2021-01-31   1415    1570\n",
       "2021-02-28   1366    1612\n",
       "2021-03-31   1702    1620\n",
       "2021-04-30   1500    1306\n",
       "2021-05-31   1571    1791\n",
       "2021-06-30   1434    1582\n",
       "2021-07-31   1570    1681\n",
       "2021-08-31   1611    1665\n",
       "2021-09-30    628     711"
      ]
     },
     "execution_count": 464,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.resample(rule = 'M',on = 'time').apply(np.sum)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 465,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>743</td>\n",
       "      <td>745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>743</td>\n",
       "      <td>745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>743</td>\n",
       "      <td>745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>743</td>\n",
       "      <td>745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>743</td>\n",
       "      <td>745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>360</th>\n",
       "      <td>628</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>361</th>\n",
       "      <td>628</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>362</th>\n",
       "      <td>628</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363</th>\n",
       "      <td>628</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>364</th>\n",
       "      <td>628</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>365 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     price  volume\n",
       "0      743     745\n",
       "1      743     745\n",
       "2      743     745\n",
       "3      743     745\n",
       "4      743     745\n",
       "..     ...     ...\n",
       "360    628     711\n",
       "361    628     711\n",
       "362    628     711\n",
       "363    628     711\n",
       "364    628     711\n",
       "\n",
       "[365 rows x 2 columns]"
      ]
     },
     "execution_count": 465,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.resample(rule = 'M',on = 'time').transform(np.sum)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据可视化"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 线形图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 506,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 506,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAACF+UlEQVR4nO2dd3gU1feH39mWTTa9hyQk9N6LFEVAQUEQu1iwF1Ts/Wvv+rP3XhAVFDuiIE0FlN57DRDSe9vNtvn9cbdmNz0hhXmfh4cpd2bu7G7O3Dn3nM+RZFlGQUFBQaF9omrpDigoKCgoNB+KkVdQUFBoxyhGXkFBQaEdoxh5BQUFhXaMYuQVFBQU2jGalu6AJ9HR0XJqampLd0NBQUGhTbFx48Y8WZZj/O1rVUY+NTWVDRs2tHQ3FBQUFNoUkiQdqW6f4q5RUFBQaMcoRl5BQUGhHaMYeQUFBYV2TKvyyfvDYrGQnp6OyWRq6a7Uil6vJykpCa1W29JdUVBQUADagJFPT08nJCSE1NRUJElq6e5UiyzL5Ofnk56eTqdOnVq6OwoKCgpAG3DXmEwmoqKiWrWBB5AkiaioqDbxxqGgoHDy0OqNPNDqDbyTttJPBQWFk4c2YeQVFBQU2hslf/6JJSen2a/TJEZekqRwSZK+lyRpjyRJuyVJGilJUqQkSUskSdrv+D+iKa7VUvz8889IksSePXtauisKCgptnJzX3+D4HXdy/K67sVdWUjB7Ntb8/Ga5VlON5N8EFsmy3BMYAOwGHgKWybLcDVjmWG+zzJ07l1NPPZW5c+e2dFcUFBTaOPkffgiA+ehR8t57n+wXXiTr2Web5VqNNvKSJIUBY4BPAWRZNsuyXARMA2Y7ms0GzmvstVqKsrIyVq1axaeffsq8efN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I77FR5od99zBDAN8XDrABjwdWmcFJyI77U9GPnjQLLHepJjW7tAkiQtwsB/Lcvyj47N2ZIkJTj2JwA5ju1t/bMYDZwrSVIaMA/hsnkTCJckSeNo43lPrvt17A8D8k9kh5uIdCBdluW1jvXvEUa/vX7PZwKHZVnOlWXZAvyI+O7b+/fspL7fa6O+7/Zg5NcD3Rwz8zrEBM6vLdynJkGSJAn4FNgty/JrHrt+BZwz7FcjfPXO7Vc5ZulHAMUer4WtHlmWH5ZlOUmW5VTE97hcluUrgBXARY5mVe/X+Tlc5Gjf5ka7sixnAcckSerh2HQGsIt2+j0j3DQjJEkKcvzGnffbrr9nD+r7vS4GJkqSFOF4C5ro2FY3WnpSookmNiYD+4CDwCMt3Z8mvK9TEa9y24Atjn+TEf7IZcB+YCkQ6WgvISKNDgLbEdELLX4fDbz3scBvjuXOwDrgADAfCHBs1zvWDzj2d27pfjfifgcCGxzf9c9ARHv+noGngD3ADmAOENAev2dgLmLewYJ4Y7u+Id8rcJ3j/g8A19anD4qsgYKCgkI7pj24axQUFBQUqkEx8goKCgrtGMXIKygoKLRjFCOvoKCg0I5RjLyCgoJCO0Yx8goKCgrtGMXIKygoKLRj/h+l/z9eLZs6DQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df1 = pd.DataFrame(np.random.randn(1000,4),columns=list('ABCD'))\n",
    "df1.cumsum().plot() # 表示绘制线"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 条形图、柱状图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 510,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 510,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgo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T/t8HmfB8yn8cNtIDMf6uC5F2TmvZ063xg5TgTIzF9ExPOBP6UxJfqDDudYCJxB4xfkOyf9fFOp0CVJo3MduiQVwkKXpEJY6JJUCAtdkgphoUtSIf4PqVPv2y0VuVsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAASbUlEQVR4nO3df5CdVXnA8e/DBkmwNDKBVCDYTYAIBCYRdihUahXUxujApHScwADRoTjYIlja6ZBxpg12OqNjrbQj0xrFmrZ2I0ZBRlpBSvilgN1gYAMJDCA/gkACyC8lEJanf9wbjGF/vJu9770nd7+fmR3u7j3vuc897D4597znfZ/ITCRJ5dqj0wFIkkZnopakwpmoJalwJmpJKpyJWpIKN6WOTvfbb7/s7e2to2tJ6kpr1659OjP3H+65WhJ1b28vAwMDdXQtSV0pIh4Z6TmXPiSpcCZqSSqciVqSCmeilqTC1XIycev6e9hw+BF1dC1JAByxcUOnQ2gbZ9SSVLhKiToiLoyI9RFxT0R8uuaYJEk7GHPpIyKOAs4FjgNeBX4QEd/PzAdGOubBA+Cjy2pZVZmUBpcOdjoESR1UZUZ9BHBHZv4qM18DbgL+uN6wJEnbVZn2rgf+PiJmAC8Di4A3XXYYEZ8APgHwjunB4M8ebWWck9vy6Z2OQLuj5c93OgK1yJiJOjM3RMTngeuAXwLrgKFh2q0AVgD0Hdhj2RhJapFKJxMz8/LMPDYz3wP8Ari/3rAkSdtFlZqJETEzMzdHxDtozKyPz8znRmq/1wGH5QFLL21ZkJLUCQ9/7sNte62IWJuZfcM9V3Vrxneaa9TbgD8f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32Wxh8iNP5nfBt4APgJMKfTZ2drONs71hhcDzwFrGt+Xd3pmNs9Bju1vZEu2vVR8XcgaCz/3AsMAks6HXMHxuBI4Ec0doSsAz7Y6Zhb/P77gSeAbTQ+QZ0DnAect8PvwGXN8Rnclb8BLyGXpMJ5ZaIkFc5ELUmFM1FLUuFM1JJUOBO1JBXORC1JhTNRS1Lh/h8Vpb7TS9gB4gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(np.random.rand(10,4),columns=list('ABCD'))\n",
    "df2.plot.bar(stacked = True) # 柱状图\n",
    "df2.plot.barh()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 饼图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 513,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([<AxesSubplot:ylabel='one'>, <AxesSubplot:ylabel='two'>],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 513,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAADnCAYAAADGrxD1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAX9UlEQVR4nO3deZhU1Z3G8e/p6gUIimwCylKAQl8Qg3HfNYtGK4kak0lMcNAYY2aiWR7NpCaTPG5ZysTRqIlxjYMaY5xRY5wyMom7simolHhLVGhABdkEWQS67/3NH7fQBhu7uruqzl1+n+fppwG7uS8+/dY5de+55xoRQSkVH3W2AyilKktLrVTMaKmVihkttVIxo6VWKma01ErFjJZaqZjRUisVM1pqpWJGS61UzGiplYo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tI4CRpc/bP/YiuD7eG+hT+rzzYphWggUf2z82AW8BSwn2+lra/teVXN1ljPGAAsEmj23A7cDVIqLT9S7QUidc6bJab4JtkDfbXIJpjNkoIn1Lv96T4KEKz4jIxbYyRZGWWoVG+1KXfj8GeBYYJPqDWja9n1qFlogsIjg/sKftLFGipVYqZrTUKrRK02+P4OYOVSYttQolY8xggn3ffqvvp7tGT5Sp0OjgktYdwFV6SatrtNRKxYxOv5WKGS21UjGjpVYqZrTUSsWMllqpmNFSKxUzWmqlYkZLrVTMaKmVihkttVIxo6VWKma01ErFjJZaqZjRUisVM1pqpWJGS61UzGiplYoZLbVSMaOlVipmtNRKxYyWWqmY+X86RQDj5HWNtAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkoAAAEMCAYAAAA7ypl1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABSi0lEQVR4nO3dd3xV9f3H8df3jtzsQEjY4zKUXCCA4h6Ao3VQ96ijP3HX0Vbt0Ftbq9XW0lqrtlr3oNpatdZRr3VWwYGKiBDlXmSFDQkrIcnNuPd8f3+cC4QRSODe+73j83w8jok3d7wvkHM/5zuV1hohhBBCCLEzh+kAQgghhBCpSgolIYQQQogOSKEkhBBCCNEBKZSEEEIIIToghZIQQgghRAekUBJCCCGE6IAUSkIIIYQQHZBCSQghhBCiA1IoCSGEEEJ0QAolIYQQQogOSKEkhBBCCNEBl+kAQgiYNWtWT5fL9RgwitS+gLGAryKRyOXjxo2rMR1GCGFepp+/pFASIgW4XK7Hevfu7SsvL9/ocDhSdqdqy7JUbW3tiDVr1jwGnGo6jxDCvEw/f6Vy5SdENhlVXl5en8onGQCHw6HLy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ZsMJkeaCFb48wAcM2sUxECiL48utB1bEjiXAonbHN75QMBLH1xKGSaEkOi02WLwvdsGUFzvyd/jqwC6EmmJHY7vvm4AaXyhYm/TwgFKqQWtdGPu+J/bMuI+01reayCOESJ5gha8A6AMUYp+vdjwKAA/bzl+NbDt/bfnaAKyRqfrZRQolkTXaF0qx/x+C3TRepuUXQQghxC44TAcQwhSt9WLsJRTSbWC7EEKIJJFCSQghhBCiA1IoiawV63qLYi89IIQQQuwkFaZSCpF0Sqly4CHgfhmfJITYVzKrNnNJoSSySZ5S6ku2ncieBv5kNJEQIlOEtdZjYbtZtcWAzKpNczLrTQghhNhHMqs2c8kYJSGEECLOZFZt5pBCSQghhBCiA1IoCSGEEHEms2ozhxRKQgghRBzJrNrMIoO5hRBCiH20i+UBngb+JMsDpD8plIQQQgghOiBdb0IIIYQQHZBCSQghhBCiA1IoCSGEEEJ0QAolIYQQQogOSKEkhBBCCNEBKZSEEEIIIToghZIQQgghRAekUBJCCCGE6IAUSkIIIYQQHZBCSQghhBCiA1IoCSGEEEJ0QAolIYQQQogOSKEkhBBCCNEBKZSEEEIIIToghZIQQgghRAekUBJCCCGE6IAUSkIIIYQQHZBCSQghhBCiA1IoCSGEEEJ04P8BKpAvgiE+y1sAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 720x720 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df3 = pd.DataFrame(np.random.rand(4,2),columns=['one','two'],index = list('ABCD'))\n",
    "df3['one'].plot.pie()\n",
    "df3.plot.pie(subplots = True,figsize = (10,10),autopct = '%0.2f%%')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 散点图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 515,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:xlabel='A', ylabel='B'>"
      ]
     },
     "execution_count": 515,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEGCAYAAABsLkJ6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAZOklEQVR4nO3db4xcV3nH8d8z6/XaihPs2i40XhNXNX+UIMeIFaJa2gKhaoDIFAJpU0GFqJo3pAKJ4gBR1ReoEk6kSKVJRa2AUFEEgpjIKf+DHBRCScSmWm/jBFKLCryGgrM4JBvs8f55+sK78e56ZnfuzNx7zrnn+3mRZGfWnjOTuec55znPPcfcXQCA/DRCNwAAEAYBAAAyRQAAgEwRAAAgUwQAAMjUutANKGLbtm2+a9eu0M0AgKQ89thjT7v79pWPJxUAdu3apbGxsdDNAICkmNlPWz1OCggAMkUAAIBMEQAAIFMEAADIFAEAADJFAACwzNR0U0dPPKOp6WbopqBkSZWBAijX4fGTuuXQhAYbDc3Mz+u26/do394doZuFkjADACDp/Mj/lkMTOjszr+easzo7M6/9hyaYCdQYAQCAJGny9BkNNpZ3CYONhiZPnwnUIpQtWAAws51m9qCZPWFmx8zsg6HaAkAa3rJRM/Pzyx6bmZ/X8JaNgVqEsoWcAcxK+rC7XynpdZI+YGZXBmwPUFidFky3bhrSbdfv0YbBhi4dWqcNgw3ddv0ebd00FLppKEmwRWB3/4WkXyz893Nm9qSkHZKeCNUmoIg6Lpju27tDo7u3afL0GQ1v2UjnX3NRrAGY2S5Jr5b0aIvnbjKzMTMbO3XqVOVtA1qp84Lp1k1DunrnZjr/DAQPAGa2SdIhSR9y92dXPu/uB919xN1Htm+/aDdTIIgyFkzrlE5CGoLeB2Bmgzrf+d/j7l8J2RagiH4vmNYxnYT4hawCMkmfkfSku98Rqh1AN/q5YFrndBLiFnIGMCrpvZL+28zGFx77uLt/PVyTgM71a8F0MZ10VhdmFIvp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Y+PcVddzZFfXDDADo3rskfd7dr3D3Xe6+U9L/SvqjwO0COkIAALp3o6T7Vjx2SKSBkAhSQACQKWYAAJApAgAAZIoAAACZIgAAQKYIAACQKQIAAGSKAAAAmfp/Pi+LQd0Q7K0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 表示两个属性之间的关系\n",
    "df4 = pd.DataFrame(np.random.randn(100,4),columns=list('ABCD'))\n",
    "df4.plot.scatter(x = 'A',y = 'B')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 519,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:xlabel='B', ylabel='D'>"
      ]
     },
     "execution_count": 519,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEGCAYAAABsLkJ6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABwoUlEQVR4nO2ddYBc1dnwf2dcVmZ9N+ubZONOhDgRQpDglJRStNBCaUud8vWFeqFvoaVAW6Sl9IW0SLEigYQEEuICcV13mbVxuff7Y9khm5Wsz8r5/ZW99865z53MPc85jwpVVZFIJBLJyEMTbgEkEolEEh6kApBIJJIRilQAEolEMkKRCkAikUhGKFIBSCQSyQhFF24BukN8fLyalZUVbjEkEolkSLF3794aVVUTzj4+pBRAVlYWe/bsCbcYEolEMqQQQhS2d1yagCQSiWSEIhWARCKRjFCkApBIJJIRypDyAbSH3++npKQEj8cTblEGJSaTibS0NPR6fbhFkUgkg4whrwBKSkqIjIwkKysLIUS4xRlUqKpKbW0tJSUlZGdnh1scyTBCURSOVRxjR94OvAEv09O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xZJIuoTcAUgkfUcUUBduISSSriJrAUkkvcMshPgUMAEpwLLwiiORdB1pApJIesFZJqDzgWdobvIjXyzJoEeagCSSPkJV1e1APJAQblkkkq4gFYBE0kcIIcYDWqA23LJIJF1B+gAkkt7R4gMAEMBNqqoGwyiPRNJlpA9AIpFIRijSBCSRSCQjFKkAJBKJZIQiFYBEIpGMUKQCkEgkkhGKVAASiUQyQpEKQCKRSEYoUgFIJBLJCOX/A0N57HzC3Dx8AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 一张图显示，A和C关系，同时显示B和D关系\n",
    "# 返回值，视图\n",
    "ax = df4.plot.scatter(x = 'A',y = 'C',color = 'DarkBlue',label = 'Group1')\n",
    "\n",
    "# 再次向ax中绘制图形\n",
    "df4.plot.scatter(x = 'B',y = 'D',color = 'DarkGreen',label = 'Group2',\n",
    "                 alpha = 0.5,#透明度\n",
    "                 s = np.random.randint(30,100,size = 100), # 大小各不相同\n",
    "                 ax = ax) # 表示向子视图ax中继续进行绘制"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 面积图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 523,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 523,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABjDUlEQVR4nO2dd5gT1frHP2cm2d7YpfdFAQVEFFDsqNh7x4LKtYDXXu5VvPb+u9ar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aWj2b7kdXtiMzBKCJHVeM0cTRtdIE6pFnQ7K0OQYLMSySHAOGCJEGJh42u3Sym/TpxJFknEtcA7jZOf9cD4BNuTEKSUs4UQU4D5mJFhC2ijJQCs1H8LCwuLNkKquVwsLCwsLHaCJegWFhYWbQRL0C0sLCzaCJagW1hYWLQRLEG3sLCwaCNYgm5hYWHRRrAE3cLCwqKN8P9iV+mRdRheuQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df5 = pd.DataFrame(np.random.rand(10,4),columns=list('ABCD'))\n",
    "df5.plot.area(stacked = True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 箱式图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 524,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 524,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAD4CAYAAADxeG0DAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAALdklEQVR4nO3db4hldR3H8c+ncWsF/0TsiKWuU/RvZNSiS1FtyJqk/QEzDNwHUTQwj1wSpNyaB9IDSQmkWAMZWMnERh+YGCnmigM2ZdGMrLHrlJgpGZGjhRm5NLt9e7AzO7vT7MydPcf7u99z3i8Y2DkznvPjeOc9Z373d+51RAgAkNebSg8AAFANIQeA5Ag5ACRHyAEgOUIOAMmdUuKgW7ZsiaGhoRKHBoC0ZmdnX46IwZXbi4R8aGhIMzMzJQ4NAGnZfmG17UytAEByhBwAkiPkAJAcIQeA5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Ehq62NgTRHxnO0BSWdJ+lvp8RSw9DOy5DsRcW+pwZxIG0O+Q9L3F/99z+Lnbf0hfj0iPiBJtj8q6Ue2R6KN823A6o7+jPSzVoXc9tt05KrzQtshaUBS2P562+MVEU/Y3iJpUNJLpcfTYwckXV16EP3I9rskHVb7HhOptG2O/GpJd0XE+RExFBHnSfqTpE8UHldxiyt4BiS9UnosBTwm6S22x5Y22L7IdqsfF7YHJd0u6ba2X+j0u1ZdkevINMotK7bdt7j98d4Pp7hj5/8s6csRcbjgeIqIiLB9laTv2b5B0kFJz0u6ruS4Cll6TGySdEjSXZJuLTqislbOkT8cEX23BLGVyw8BoEnaNrUCAI1DyAEgOUIOAMkRcgBIjpADQHKEHACSI+QAkNz/AOQY2LvyLdbBAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 特殊的条形图，表示数据分布情况\n",
    "df6 = pd.DataFrame(np.random.randn(20,5),columns=list('ABCDE'))\n",
    "df6.plot.box() # 绿色线表示中位数，上四分之一，下四分之一，表示异常值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 525,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>-0.28</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.37</td>\n",
       "      <td>-0.27</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>1.04</td>\n",
       "      <td>0.99</td>\n",
       "      <td>0.81</td>\n",
       "      <td>1.04</td>\n",
       "      <td>0.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>-2.12</td>\n",
       "      <td>-1.48</td>\n",
       "      <td>-1.21</td>\n",
       "      <td>-2.41</td>\n",
       "      <td>-1.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>-1.09</td>\n",
       "      <td>-0.69</td>\n",
       "      <td>0.00</td>\n",
       "      <td>-0.61</td>\n",
       "      <td>-0.33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>-0.13</td>\n",
       "      <td>-0.09</td>\n",
       "      <td>0.36</td>\n",
       "      <td>-0.10</td>\n",
       "      <td>0.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.21</td>\n",
       "      <td>0.54</td>\n",
       "      <td>0.83</td>\n",
       "      <td>0.39</td>\n",
       "      <td>0.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1.96</td>\n",
       "      <td>2.40</td>\n",
       "      <td>1.89</td>\n",
       "      <td>1.07</td>\n",
       "      <td>1.45</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           A      B      C      D      E\n",
       "count  20.00  20.00  20.00  20.00  20.00\n",
       "mean   -0.28   0.05   0.37  -0.27   0.15\n",
       "std     1.04   0.99   0.81   1.04   0.85\n",
       "min    -2.12  -1.48  -1.21  -2.41  -1.55\n",
       "25%    -1.09  -0.69   0.00  -0.61  -0.33\n",
       "50%    -0.13  -0.09   0.36  -0.10   0.21\n",
       "75%     0.21   0.54   0.83   0.39   0.61\n",
       "max     1.96   2.40   1.89   1.07   1.45"
      ]
     },
     "execution_count": 525,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df6.describe().round(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 直方图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 529,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:ylabel='Frequency'>"
      ]
     },
     "execution_count": 529,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAD4CAYAAAAD6PrjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAVg0lEQVR4nO3df7BfdX3n8efLEL1YqWhI05iQTWqhLJoSNeLPWgtri2hF1i0b3UJ0nUa3OJpZ2wVsp+pOmdFxK9i1dZsW12htMIsirOJahKyFGRESDCT8cJtqKDcGiAFFKqDE9/7xPTle4RK+N/ee7/fe3Odj5js553PO+Zz3dxjyyuec8/2cVBWSJAE8adgFSJKmD0NBktQyFCRJLUNBktQyFCRJrcOGXcBkHHXUUbV06dJhlyFJM8qWLVu+W1Xzx9s2o0Nh6dKlbN68edhlSNKMkuSOx9vm5SNJUstQkCS1DAVJUmtG31OQpGH48Y9/zOjoKA899NCwSzmgkZERFi9ezNy5c/s+xlCQpAkaHR3liCOOYOnSpS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4lWQy8BvibYdcyGYbCNJPkNGBXVd007FqG4D8CXxp2ER0Yb/qWQ/ovyLGSLAWeB3x9yKV07UJ6/5j7yZDrmJRp9TuF2SLJV4BfHGfTHwHvoXfp6JBxoO9bVZc1+/wRvUsOnx5kbepWkqcBnwXWVtX9w66nK0leC9xTVVuSvHLI5UyKoTAEVfVvxmtPshxYBtyUBHqXUm5McmJV3TXAEqfU433f/ZK8GXgtcHIdmj+cmZXTtySZSy8QPl1Vnxt2PR17GfC6JKcCI8DPJ/nbqvrdIdc1Yf54bRpLshNYWVWH7CyTSU4BPgz8elXtGXY9XUhyGL2b6CfTC4MbgDcdyr/WT+9fNeuBe6tq7ZDLGahmpPAHVfXaIZdyULynoGH7KHAEcGWSrUn+x7ALmmrNjfT907fcBmw8lAOh8TLgTOCk5r/r1uZf0ZrmHClIklqOFCRJLUNBktQyFCRJLUNBktQyFCRJLUNBktQyFCRJrf8PAw4msPP66lcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAD4CAYAAAAD6PrjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAV20lEQVR4nO3dfbRddX3n8ffHEA0qLRpSioQ0qYUyqCVqxMdSCmOLaEXGlokzBXRcjU5xIWtsebBdVafDWhWmgtbWNi2O0dqLGRRhHByLwAisJQ8JhGecpgpyY4AYUER5kPidP87O9go3ybm595x9H96vtc5i79/e+7e/Z7HW/eS39z6/napCkiSAZ3RdgCRp+jAUJEktQ0GS1DIUJEktQ0GS1Nqj6wImY5999qmlS5d2XYYkzSjr16//blUtGm/bjA6FpUuXsm7duq7LkKQZJck9O9rm5SNJUstQkCS1DA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BmGvTtyQ5IMmVSe5IcnuS93Zd0zAkmZfkpiRf6rqW3WUoTENJDgB+C/h217UMwWXAi6vq14D/B5zZcT1Tbsz0LW8ADgHeluSQbqsauCeB91XVIcCrgJPnwHcGeC9wZ9dFTIahMD2dC5wGzPqnAKrqn6vqyWb1Wnq/TZlt2ulbquoJYPv0LbNWVW2uqhub5R/Q+0O5f7dVDVaSxcAbgX/oupbJMBSmmSTHApuq6uaua+nAfwK+3HURAzDe9C2z+g/kWEmWAi8FOpq1bmjOo/ePuZ90XMekTKvfKcwVSb4K/OI4m/4EeD+9S0ezxs6+b1Vd3OzzJ/QuOXx2mLVpsJI8F/g8cGpVPdx1PYOS5E3AA1W1PskRHZczKYZCB6rq347XnuQlwDLg5iTQu5RyY5LDquq+IZY4pXb0fbdL8nbgTcBRNTt/ODMnp29JMp9eIHy2qr7QdT0D9lrgzUmOARYAP5fkH6vq9zuua8L88do0luRuYEVVzdpZJpMcDXwE+I2q2tJ1PYOQZA96N9GPohcGNwD/YTb/Wj+9f9WsAR6sqlM7LmeompHCH1XVmzouZbd4T0Fd+ziwF3BZkg1J/rbrgqZacyN9+/QtdwJrZ3MgNF4LnAAc2fx/3dD8K1rTnCMFSVLLkYIkqWUoSJJahoIkqWUoSJJahoIkqWUoSJJahoIkqfX/ATWVQsG2z5uAAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 表示概率，分布，一种形式的条形图\n",
    "df7 =pd.DataFrame(data = {'A':np.random.randn(1000) - 2,\n",
    "                          'B':np.random.randn(1000),\n",
    "                          'C':np.random.randn(1000) + 2})\n",
    "df7.plot.hist()\n",
    "df7.plot.hist(stacked = False,alpha = 0.65) # 堆叠效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 531,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[<AxesSubplot:title={'center':'A'}>,\n",
       "        <AxesSubplot:title={'center':'B'}>],\n",
       "       [<AxesSubplot:title={'center':'C'}>, <AxesSubplot:>]], dtype=object)"
      ]
     },
     "execution_count": 531,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAh4AAAIYCAYAAAAimuVXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAmFklEQVR4nO3dbZBkZ3ne8f9lRLAiuSyI7Im82nj4sHZF9hphpmRSIpWRiY2QHK9IJYqwCiQgXn+QEkgmlSy4KpBQSjaJBbZjm2QJFKIikJUAQYUU27JKHULFAiRFZvVi4o0Zot1apGAU0IBDauQ7H+YsbtazOz0z3c/pnvn/qqamz9Pn9HOf6e6z13nOy6aqkCRJauE7+i5AkiTtHgYPSZLUjMFDkiQ1Y/CQJEnNGDwkSVIzBg9JktSMwUOSJDVj8NCmJRkkeSbJC/quRdLOlGQ5yR8lWem2N3cn2dt3Xdo+g4c2Jck88JeBAn6632ok7XB/rarOBy4CngL+dc/1aAwMHtqs1wMPAB8Abui3FEm7QVX9X+A/Apf0XYu275y+C9DMeT3wLuDTwANJ5qrqqZ5rkrSDJfmzwN9ibadHM87goZEleQXw/cCdVfXlJP8T+Bng3f1WJmmH+k9JVoHzgP8NvKrnejQGHmrRZtwA/FZVfbmb/hAebpE0OddU1QXAdwI3A/8lyZ/vtyRtl8FDI0lyLnAt8FeSfCnJl4C/B7wkyUv6rU7STlZVz1XVR4HngFf0XY+2x+ChUV3D2pf+EuDS7ucvAv+VtfM+JGkisuYA8ELgib7r0fakqvquQTMgyW8Aj1XV0mnt1wK/DFxcVau9FCdpx0myDMyxtsNTwBeBf15Vt/dZl7bP4CFJkprxUIskSWrG4CFJkpoxeEiSpGYMHpIkq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7JvX6M2zXHV5id64z7N71lqQzSlX1XYMkSdolvGW6JElqxuDRyG68hXySvUnuT/J4kseSvLnvmlpJ8rwk/z3JJ/quRZKmicGjgV18C/lVYKmqLgFeDty0S9Yb4M3AE30XIUnTxuDRxrduIV9V/w84dQv5Ha2qTlbVw93jZ1n7h3jH38E2ycXA1cC/67sWSZo2Bo82dv0t5JPMAy8FPt1zKS38IvAPgT/uuQ5JmjoGD01ckvOBjwBvqaqv9V3PJCX5KeDpqnqo71okaRoZPNrY8BbyO1WS57MWOm6vqo/2XU8DlwM/nWSZtUNqP57k3/dbkiRND+/j0UCSc4D/AbyStcDxWeBndvrdXJMEuA34SlW9pedymkuyCPyDqvqpnkuRpKnhiEcDVbUKnLqF/BPAnTs9dHQuB17H2l7/I93PVX0XJUnqjyMekiSpGUc8JElSMwYPSZLUjMFDkiQ1Y/CQJEnNGDwkSVIzBg9JktSMwUOSJDVj8JAkSc38f+4HCb072j7TAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 648x648 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 子视图的直方图\n",
    "df7.hist(figsize = (9,9)) # 3个属性各绘制了直方图"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 实战-拉勾网数据分析师招聘数据分析"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 加载、查看、去重"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 564,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 565,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3683, 12)"
      ]
     },
     "execution_count": 565,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job = pd.read_csv('./lagou2020.csv')\n",
    "job.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 566,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>25k-35k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>25k-45k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  positionName companyShortName city companySize education financeStage  \\\n",
       "0      高级数据分析师              拉勾网   北京   500-2000人        本科        D轮及以上   \n",
       "1        数据分析师         OK Group   北京   500-2000人        大专           B轮   \n",
       "2      高级数据分析师           金山办公软件   北京     2000人以上        本科         上市公司   \n",
       "3        数据分析师           金山办公软件   北京     2000人以上        本科         上市公司   \n",
       "4        数据分析师             京东集团   北京     2000人以上        本科         上市公司   \n",
       "\n",
       "  industryField   salary workYear  \\\n",
       "0          企业服务  25k-35k    5-10年   \n",
       "1            金融  25k-45k    5-10年   \n",
       "2         移动互联网  15k-25k     3-5年   \n",
       "3         移动互联网  15k-25k     1-3年   \n",
       "4            电商  15k-30k     3-5年   \n",
       "\n",
       "                                              hitags  \\\n",
       "0  [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                NaN   \n",
       "2                                                NaN   \n",
       "3                                                NaN   \n",
       "4                             [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "\n",
       "                companyLabelList  \\\n",
       "0  [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1   [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4  [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "\n",
       "                                          job_detail  \n",
       "0  \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...  \n",
       "1  \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...  \n",
       "2  \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...  \n",
       "3  \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...  \n",
       "4  \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...  "
      ]
     },
     "execution_count": 566,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 567,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['北京', '上海', '深圳', '广州', '杭州', '成都', '南京', '武汉', '西安', '厦门', '长沙',\n",
       "       '苏州', '天津'], dtype=object)"
      ]
     },
     "execution_count": 567,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.city.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 568,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "job.drop_duplicates(inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 569,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3507, 12)"
      ]
     },
     "execution_count": 569,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 570,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "job.reset_index(inplace=True) # 行索引重置：0~最后，从0开始编号"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 571,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index</th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>25k-35k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>25k-45k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3502</th>\n",
       "      <td>3678</td>\n",
       "      <td>内容运营高级经理-审核方向</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>20k-30k</td>\n",
       "      <td>不限</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、负责字节跳动旗下产品图文类及小视频类内容的业务管理，对...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3503</th>\n",
       "      <td>3679</td>\n",
       "      <td>质检岗位基层管理岗</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>6k-10k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、负责对日常业务数据进行分析、挖掘潜在隐患风险、提出风险...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3504</th>\n",
       "      <td>3680</td>\n",
       "      <td>高级审核编辑</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>8k-12k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、根据审核标准，对自媒体发布的国内热点、新闻、优质内容做...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3505</th>\n",
       "      <td>3681</td>\n",
       "      <td>数据运营分析专员</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>6k-8k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3506</th>\n",
       "      <td>3682</td>\n",
       "      <td>数据运营分析实习生</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>2k-3k</td>\n",
       "      <td>不限</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3507 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      index   positionName companyShortName city companySize education  \\\n",
       "0         0        高级数据分析师              拉勾网   北京   500-2000人        本科   \n",
       "1         1          数据分析师         OK Group   北京   500-2000人        大专   \n",
       "2         2        高级数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "3         3          数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "4         4          数据分析师             京东集团   北京     2000人以上        本科   \n",
       "...     ...            ...              ...  ...         ...       ...   \n",
       "3502   3678  内容运营高级经理-审核方向             字节跳动   天津     2000人以上        本科   \n",
       "3503   3679      质检岗位基层管理岗             字节跳动   天津     2000人以上        本科   \n",
       "3504   3680         高级审核编辑             字节跳动   天津     2000人以上        本科   \n",
       "3505   3681       数据运营分析专员             字节跳动   天津     2000人以上        本科   \n",
       "3506   3682      数据运营分析实习生             字节跳动   天津     2000人以上        本科   \n",
       "\n",
       "     financeStage industryField   salary workYear  \\\n",
       "0           D轮及以上          企业服务  25k-35k    5-10年   \n",
       "1              B轮            金融  25k-45k    5-10年   \n",
       "2            上市公司         移动互联网  15k-25k     3-5年   \n",
       "3            上市公司         移动互联网  15k-25k     1-3年   \n",
       "4            上市公司            电商  15k-30k     3-5年   \n",
       "...           ...           ...      ...      ...   \n",
       "3502           C轮         文娱丨内容  20k-30k       不限   \n",
       "3503           C轮         文娱丨内容   6k-10k     3-5年   \n",
       "3504           C轮         文娱丨内容   8k-12k     3-5年   \n",
       "3505           C轮         文娱丨内容    6k-8k     3-5年   \n",
       "3506           C轮         文娱丨内容    2k-3k       不限   \n",
       "\n",
       "                                                 hitags  \\\n",
       "0     [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                   NaN   \n",
       "2                                                   NaN   \n",
       "3                                                   NaN   \n",
       "4                                [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "...                                                 ...   \n",
       "3502                                                NaN   \n",
       "3503                                                NaN   \n",
       "3504                                                NaN   \n",
       "3505                                                NaN   \n",
       "3506                                                NaN   \n",
       "\n",
       "                       companyLabelList  \\\n",
       "0         [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1          [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2         [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3         [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4         [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "...                                 ...   \n",
       "3502  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3503  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3504  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3505  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3506  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "\n",
       "                                             job_detail  \n",
       "0     \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...  \n",
       "1     \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...  \n",
       "2     \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...  \n",
       "3     \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...  \n",
       "4     \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...  \n",
       "...                                                 ...  \n",
       "3502  \\n        职位职责：\\n1、负责字节跳动旗下产品图文类及小视频类内容的业务管理，对...  \n",
       "3503  \\n        职位职责：\\n1、负责对日常业务数据进行分析、挖掘潜在隐患风险、提出风险...  \n",
       "3504  \\n        职位职责：\\n1、根据审核标准，对自媒体发布的国内热点、新闻、优质内容做...  \n",
       "3505  \\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...  \n",
       "3506  \\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...  \n",
       "\n",
       "[3507 rows x 13 columns]"
      ]
     },
     "execution_count": 571,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 过滤非数据分析岗位"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 573,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0        True\n",
       "1        True\n",
       "2        True\n",
       "3        True\n",
       "4        True\n",
       "        ...  \n",
       "3502    False\n",
       "3503    False\n",
       "3504    False\n",
       "3505    False\n",
       "3506    False\n",
       "Name: positionName, Length: 3507, dtype: bool"
      ]
     },
     "execution_count": 573,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# contains这个是字符串中方法，进行逻辑判断，是否含有\n",
    "cond = job['positionName'].str.contains('数据分析')\n",
    "cond"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 574,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1652, 13)"
      ]
     },
     "execution_count": 574,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job = job[cond]\n",
    "job.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 576,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "job.reset_index(inplace=True) # 重置行索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 577,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>level_0</th>\n",
       "      <th>index</th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>25k-35k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>25k-45k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1647</th>\n",
       "      <td>3177</td>\n",
       "      <td>3352</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>华泛信息</td>\n",
       "      <td>苏州</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>大专</td>\n",
       "      <td>不需要融资</td>\n",
       "      <td>移动互联网,其他</td>\n",
       "      <td>10k-15k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"技能培训\",\"节日礼物\",\"带薪年假\",\"绩效奖金\"]</td>\n",
       "      <td>\\n岗位职责：\\n深入了解项目组的业务需求,在此基础上进行数据收集、数据分析、商业报告的撰写...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1648</th>\n",
       "      <td>3178</td>\n",
       "      <td>3353</td>\n",
       "      <td>大数据分析师</td>\n",
       "      <td>德融嘉信</td>\n",
       "      <td>苏州</td>\n",
       "      <td>50-150人</td>\n",
       "      <td>本科</td>\n",
       "      <td>不需要融资</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>6k-12k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[]</td>\n",
       "      <td>\\n岗位职责：\\n1. 开展业务专题分析，使用数据挖掘各类算法构建相关的业务模型，完成业务分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1649</th>\n",
       "      <td>3404</td>\n",
       "      <td>3580</td>\n",
       "      <td>ETL/大数据/数据分析/实施</td>\n",
       "      <td>格蒂电力</td>\n",
       "      <td>天津</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>未融资</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>6k-12k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"技能培训\",\"带薪年假\",\"绩效奖金\",\"岗位晋升\"]</td>\n",
       "      <td>\\n工作职责\\n1.   负责数据接入、数据整合中的链路配置与调度配置工作。\\n职位要求\\n...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1650</th>\n",
       "      <td>3405</td>\n",
       "      <td>3581</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>吉城美家</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>未融资</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>7k-14k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"五险一金\",\"岗位晋升\"]</td>\n",
       "      <td>\\n负责站点日常数据分析、提前通过数据分析对业务有预测性、通过数据说话、解决站点管理问题、\\n</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1651</th>\n",
       "      <td>3406</td>\n",
       "      <td>3582</td>\n",
       "      <td>数据分析支持</td>\n",
       "      <td>云链供应链</td>\n",
       "      <td>天津</td>\n",
       "      <td>15-50人</td>\n",
       "      <td>本科</td>\n",
       "      <td>未融资</td>\n",
       "      <td>金融,企业服务</td>\n",
       "      <td>4k-6k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[]</td>\n",
       "      <td>\\n        岗位职责：\\n1、负责部门日常数据报表的制定、维护、优化；\\n2、支持运...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1652 rows × 14 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      level_0  index     positionName companyShortName city companySize  \\\n",
       "0           0      0          高级数据分析师              拉勾网   北京   500-2000人   \n",
       "1           1      1            数据分析师         OK Group   北京   500-2000人   \n",
       "2           2      2          高级数据分析师           金山办公软件   北京     2000人以上   \n",
       "3           3      3            数据分析师           金山办公软件   北京     2000人以上   \n",
       "4           4      4            数据分析师             京东集团   北京     2000人以上   \n",
       "...       ...    ...              ...              ...  ...         ...   \n",
       "1647     3177   3352            数据分析师             华泛信息   苏州     2000人以上   \n",
       "1648     3178   3353           大数据分析师             德融嘉信   苏州     50-150人   \n",
       "1649     3404   3580  ETL/大数据/数据分析/实施             格蒂电力   天津   500-2000人   \n",
       "1650     3405   3581            数据分析师             吉城美家   天津     2000人以上   \n",
       "1651     3406   3582           数据分析支持            云链供应链   天津      15-50人   \n",
       "\n",
       "     education financeStage industryField   salary workYear  \\\n",
       "0           本科        D轮及以上          企业服务  25k-35k    5-10年   \n",
       "1           大专           B轮            金融  25k-45k    5-10年   \n",
       "2           本科         上市公司         移动互联网  15k-25k     3-5年   \n",
       "3           本科         上市公司         移动互联网  15k-25k     1-3年   \n",
       "4           本科         上市公司            电商  15k-30k     3-5年   \n",
       "...        ...          ...           ...      ...      ...   \n",
       "1647        大专        不需要融资      移动互联网,其他  10k-15k     1-3年   \n",
       "1648        本科        不需要融资         移动互联网   6k-12k     1-3年   \n",
       "1649        大专          未融资          企业服务   6k-12k     3-5年   \n",
       "1650        本科          未融资         移动互联网   7k-14k     1-3年   \n",
       "1651        本科          未融资       金融,企业服务    4k-6k     1-3年   \n",
       "\n",
       "                                                 hitags  \\\n",
       "0     [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                   NaN   \n",
       "2                                                   NaN   \n",
       "3                                                   NaN   \n",
       "4                                [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "...                                                 ...   \n",
       "1647                                                NaN   \n",
       "1648                                                NaN   \n",
       "1649                                                NaN   \n",
       "1650                                                NaN   \n",
       "1651                                                NaN   \n",
       "\n",
       "                   companyLabelList  \\\n",
       "0     [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1      [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2     [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3     [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4     [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "...                             ...   \n",
       "1647  [\"技能培训\",\"节日礼物\",\"带薪年假\",\"绩效奖金\"]   \n",
       "1648                             []   \n",
       "1649  [\"技能培训\",\"带薪年假\",\"绩效奖金\",\"岗位晋升\"]   \n",
       "1650                [\"五险一金\",\"岗位晋升\"]   \n",
       "1651                             []   \n",
       "\n",
       "                                             job_detail  \n",
       "0     \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...  \n",
       "1     \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...  \n",
       "2     \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...  \n",
       "3     \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...  \n",
       "4     \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...  \n",
       "...                                                 ...  \n",
       "1647  \\n岗位职责：\\n深入了解项目组的业务需求,在此基础上进行数据收集、数据分析、商业报告的撰写...  \n",
       "1648  \\n岗位职责：\\n1. 开展业务专题分析，使用数据挖掘各类算法构建相关的业务模型，完成业务分...  \n",
       "1649  \\n工作职责\\n1.   负责数据接入、数据整合中的链路配置与调度配置工作。\\n职位要求\\n...  \n",
       "1650    \\n负责站点日常数据分析、提前通过数据分析对业务有预测性、通过数据说话、解决站点管理问题、\\n  \n",
       "1651  \\n        岗位职责：\\n1、负责部门日常数据报表的制定、维护、优化；\\n2、支持运...  \n",
       "\n",
       "[1652 rows x 14 columns]"
      ]
     },
     "execution_count": 577,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 薪水"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 587,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "# applymap和map类似的，map操作Series，applymap操作的DataFrame\n",
    "job['salary'] = job['salary'].str.lower().str.extract(r'(\\d+)[k]-(\\d+)[k]')\\\n",
    "             .applymap(lambda x : int(x)).mean(axis = 1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 技能要求"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "Python  \n",
    "SQL  \n",
    "Tableau  \n",
    "Excel  \n",
    "SPSS/SAS  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 589,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "job['job_detail'] = job['job_detail'].str.lower() # 变成小写"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 590,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "job['Python'] = job['job_detail'].map(lambda x :1 if 'python' in x else 0)\n",
    "job['SQL'] = job['job_detail'].map(lambda x : 1 if 'sql' in x else 0)\n",
    "job['Tableau'] = job['job_detail'].map(lambda x :1 if 'tableau' in x else 0)\n",
    "job['Excel'] = job['job_detail'].map(lambda x :1 if 'excel' in x else 0)\n",
    "job['SPSS/SAS'] = job['job_detail'].map(lambda x :1 if ('spss' in x) or ('sas' in x) else 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 591,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>level_0</th>\n",
       "      <th>index</th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "      <th>Python</th>\n",
       "      <th>SQL</th>\n",
       "      <th>Tableau</th>\n",
       "      <th>Excel</th>\n",
       "      <th>SPSS/SAS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>30.0</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>35.0</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>20.0</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>20.0</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>22.5</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   level_0  index positionName companyShortName city companySize education  \\\n",
       "0        0      0      高级数据分析师              拉勾网   北京   500-2000人        本科   \n",
       "1        1      1        数据分析师         OK Group   北京   500-2000人        大专   \n",
       "2        2      2      高级数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "3        3      3        数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "4        4      4        数据分析师             京东集团   北京     2000人以上        本科   \n",
       "\n",
       "  financeStage industryField  salary workYear  \\\n",
       "0        D轮及以上          企业服务    30.0    5-10年   \n",
       "1           B轮            金融    35.0    5-10年   \n",
       "2         上市公司         移动互联网    20.0     3-5年   \n",
       "3         上市公司         移动互联网    20.0     1-3年   \n",
       "4         上市公司            电商    22.5     3-5年   \n",
       "\n",
       "                                              hitags  \\\n",
       "0  [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                NaN   \n",
       "2                                                NaN   \n",
       "3                                                NaN   \n",
       "4                             [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "\n",
       "                companyLabelList  \\\n",
       "0  [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1   [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4  [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "\n",
       "                                          job_detail  Python  SQL  Tableau  \\\n",
       "0  \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...       1    1        0   \n",
       "1  \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...       0    1        0   \n",
       "2  \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...       1    1        0   \n",
       "3  \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...       0    1        0   \n",
       "4  \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...       0    1        1   \n",
       "\n",
       "   Excel  SPSS/SAS  \n",
       "0      0         0  \n",
       "1      0         0  \n",
       "2      0         0  \n",
       "3      0         1  \n",
       "4      1         1  "
      ]
     },
     "execution_count": 591,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 行业信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 593,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0           企业服务\n",
       "1             金融\n",
       "2          移动互联网\n",
       "3          移动互联网\n",
       "4             电商\n",
       "5             教育\n",
       "6             金融\n",
       "7          移动互联网\n",
       "8     移动互联网,消费生活\n",
       "9          移动互联网\n",
       "10      移动互联网,电商\n",
       "11       游戏,数据服务\n",
       "12      移动互联网,电商\n",
       "13      移动互联网,电商\n",
       "14          消费生活\n",
       "15         移动互联网\n",
       "16      移动互联网,金融\n",
       "17            硬件\n",
       "18            教育\n",
       "19    移动互联网,数据服务\n",
       "20      移动互联网,教育\n",
       "21         文娱丨内容\n",
       "22         移动互联网\n",
       "23      移动互联网,教育\n",
       "24    移动互联网,数据服务\n",
       "25      移动互联网,社交\n",
       "26    移动互联网,数据服务\n",
       "27            金融\n",
       "28    移动互联网,数据服务\n",
       "29    移动互联网,数据服务\n",
       "Name: industryField, dtype: object"
      ]
     },
     "execution_count": 593,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job['industryField'][:30]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 594,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):\n",
    "    field = x.split(',')\n",
    "    if (field[0] == '移动互联网') & (len(field) > 1):\n",
    "        return field[1]\n",
    "    else:\n",
    "        return field[0]\n",
    "job['industryField'] = job.industryField.map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 595,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0      企业服务\n",
       "1        金融\n",
       "2     移动互联网\n",
       "3     移动互联网\n",
       "4        电商\n",
       "5        教育\n",
       "6        金融\n",
       "7     移动互联网\n",
       "8      消费生活\n",
       "9     移动互联网\n",
       "10       电商\n",
       "11       游戏\n",
       "12       电商\n",
       "13       电商\n",
       "14     消费生活\n",
       "15    移动互联网\n",
       "16       金融\n",
       "17       硬件\n",
       "18       教育\n",
       "19     数据服务\n",
       "20       教育\n",
       "21    文娱丨内容\n",
       "22    移动互联网\n",
       "23       教育\n",
       "24     数据服务\n",
       "25       社交\n",
       "26     数据服务\n",
       "27       金融\n",
       "28     数据服务\n",
       "29     数据服务\n",
       "Name: industryField, dtype: object"
      ]
     },
     "execution_count": 595,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.industryField[:30]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.1"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "279.273px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
